Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assume missions with one drive to is return home #139

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading