Skip to content

Commit

Permalink
Publish random pose
Browse files Browse the repository at this point in the history
  • Loading branch information
tsundvoll authored and anetteu committed Dec 8, 2022
1 parent 5a59eea commit bfb3d32
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/isar_robot/robotinterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,19 @@ def get_telemetry_publishers(self, queue: Queue, robot_id: str) -> List[Thread]:
return publisher_threads

def _get_pose_telemetry(self, robot_id: str) -> str:
random_position: Position = Position(
x=random.uniform(0.1, 10),
y=random.uniform(0.1, 10),
z=random.uniform(0.1, 10),
frame=Frame("asset"),
)
random_pose: Pose = Pose(
position=random_position,
orientation=self.pose.orientation,
frame=Frame("asset"),
)
pose_payload: TelemetryPosePayload = TelemetryPosePayload(
pose=self.pose, robot_id=robot_id, timestamp=datetime.utcnow()
pose=random_pose, robot_id=robot_id, timestamp=datetime.utcnow()
)
return json.dumps(pose_payload, cls=EnhancedJSONEncoder)

Expand Down

0 comments on commit bfb3d32

Please sign in to comment.