Skip to content

Commit

Permalink
Wayfinding optimization (#1101)
Browse files Browse the repository at this point in the history
* Removed IndyAV file

* Reduced error by 50 percent

* reformatted file
  • Loading branch information
DaniParr authored Nov 6, 2023
1 parent e2c479c commit b3ca7c4
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from .vrx import Vrx

___author___ = "Alex Perez"
# Optimized by Daniel Parra


class VrxWayfinding2(Vrx):
Expand Down Expand Up @@ -42,12 +43,18 @@ async def run(self, parameters):
poses = poses[:start_pose_index]
path = path[1:]

# self.send_feedback('Sorted poses' + str(poses))
await self.wait_for_task_such_that(lambda task: task.state in ["running"])

# do movements
for index in path:
self.send_feedback(f"Going to {poses[index]}")

# Go to goal
P = 0.85
part_way_point = [x * P for x in poses[index][0][:-1]]
part_way_point.append(poses[index][0][-1])
self.send_feedback(
f"\nPartway:\n{part_way_point}\nEndPoint:\n{poses[index][0]}",
)

await self.send_trajectory_without_path([part_way_point, poses[index][1]])
await self.send_trajectory_without_path(poses[index])

0 comments on commit b3ca7c4

Please sign in to comment.