Skip to content

Commit

Permalink
Assume missions with one drive to is return home
Browse files Browse the repository at this point in the history
  • Loading branch information
andchiind committed Mar 1, 2024
1 parent 2e62e30 commit 1a50df6
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/isar_exr/robotinterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def update_site_with_tasks(
) -> List[str]: # Returns a list of POI IDs
new_stage_id: str = None
poi_ids: List[str] = []
is_possible_return_to_home_mission = False
is_possible_return_to_home_mission = True
steps_n = 0
try:
for task in tasks:
Expand All @@ -112,17 +112,9 @@ def update_site_with_tasks(
if isinstance(step, Localize):
steps_n -= 1
if isinstance(step, DriveToPose):
if (
step.pose.position.x == 0.0
and step.pose.position.y == 0.0
and step.pose.position.z == 0.0
and step.pose.orientation.x == 0.0
and step.pose.orientation.y == 0.0
and step.pose.orientation.z == 0.0
):
is_possible_return_to_home_mission = True
robot_pose: Pose = step.pose
if isinstance(step, InspectionStep):
is_possible_return_to_home_mission = False
customer_tag: str = task.tag_id + "|" + str(robot_pose)
existing_poi_id = (
self.api.get_point_of_interest_by_customer_tag(
Expand Down

0 comments on commit 1a50df6

Please sign in to comment.