From 1a50df6e68ba5b833b4ff82e5bbb27040d193ba1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Chirico=20Indreb=C3=B8?= Date: Thu, 29 Feb 2024 07:42:38 +0100 Subject: [PATCH] Assume missions with one drive to is return home --- src/isar_exr/robotinterface.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/isar_exr/robotinterface.py b/src/isar_exr/robotinterface.py index 8c5cd84..9489b13 100644 --- a/src/isar_exr/robotinterface.py +++ b/src/isar_exr/robotinterface.py @@ -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: @@ -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(