Skip to content

Commit

Permalink
Use orientation and pose in customer tag
Browse files Browse the repository at this point in the history
  • Loading branch information
andchiind committed Feb 20, 2024
1 parent 7421b59 commit dde7206
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/isar_exr/robotinterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,9 @@ def update_site_with_tasks(self, tasks: List[Task]) -> List[str]: # Returns a li
is_possible_return_to_home_mission = True
robot_pose: Pose = step.pose
if isinstance(step, InspectionStep):
customer_tag: str = task.tag_id + robot_pose.to_string()
existing_poi_id = self.api.get_point_of_interest_by_customer_tag(
customer_tag=task.tag_id, site_id=settings.ROBOT_EXR_SITE_ID
customer_tag=customer_tag, site_id=settings.ROBOT_EXR_SITE_ID
)
if existing_poi_id == None:
new_stage_id: str = self.create_new_stage()
Expand All @@ -129,6 +130,7 @@ def update_site_with_tasks(self, tasks: List[Task]) -> List[str]: # Returns a li
step=step,
robot_pose=robot_pose, # This pose is set by the previously received DriveToStep
stage_id=new_stage_id,
customer_tag=customer_tag,
)
)
poi_ids.append(poi_id)
Expand Down Expand Up @@ -190,8 +192,6 @@ def initiate_mission(self, mission: Mission) -> None:
poi_ids: List[str] = self.update_site_with_tasks(mission.tasks)
except RobotMissionNotSupportedException:
return
except Exception as e:
raise e

mission_definition_id: str = self.create_mission_definition(mission.id, mission.tasks, poi_ids)

Expand Down Expand Up @@ -313,7 +313,7 @@ def _create_video(self, step: Union[TakeVideo, TakeThermalVideo]):
raise NotImplementedError

def _create_and_add_poi(
self, task: Task, step: Step, robot_pose: Pose, stage_id: str
self, task: Task, step: Step, robot_pose: Pose, stage_id: str, customer_tag: str
) -> str:
target: Position = self.transform.transform_position(
positions=step.target,
Expand Down Expand Up @@ -352,7 +352,7 @@ def _create_and_add_poi(

add_point_of_interest_input: dict[str, PointOfInterestActionPhotoInput] = {
"name": task.tag_id if task.tag_id != None else step.id,
"customerTag": task.tag_id,
"customerTag": customer_tag,
"frame": "map",
"type": PointOfInterestTypeEnum.GENERIC,
"site": settings.ROBOT_EXR_SITE_ID,
Expand Down

0 comments on commit dde7206

Please sign in to comment.