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 Feb 29, 2024
1 parent 53720c9 commit 546efbd
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 @@ -99,7 +99,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 @@ -108,17 +108,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 546efbd

Please sign in to comment.