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

Publish planning scene at startup #18

Open
jarkenau opened this issue Apr 9, 2024 · 1 comment
Open

Publish planning scene at startup #18

jarkenau opened this issue Apr 9, 2024 · 1 comment

Comments

@jarkenau
Copy link
Member

jarkenau commented Apr 9, 2024

Currently the planning scene, is added with the first pick action:

for planning_scene_box in self.planning_scene_boxes:
# add a box to the planning scene
table_pose = PoseStamped()
table_pose.header.frame_id = planning_scene_box['frame_id']
box_x = planning_scene_box['box_x_dimension']
box_y = planning_scene_box['box_y_dimension']
box_z = planning_scene_box['box_z_dimension']
table_pose.pose.position.x = planning_scene_box['box_position_x']
table_pose.pose.position.y = planning_scene_box['box_position_y']
table_pose.pose.position.z = planning_scene_box['box_position_z']
table_pose.pose.orientation.x = planning_scene_box['box_orientation_x']
table_pose.pose.orientation.y = planning_scene_box['box_orientation_y']
table_pose.pose.orientation.z = planning_scene_box['box_orientation_z']
table_pose.pose.orientation.w = planning_scene_box['box_orientation_w']
self.scene.add_box(planning_scene_box['scene_name'], table_pose, (box_x, box_y, box_z))

I think it would be best to this as an initialization step before any action, as this only requires iterating over the yaml file with respective information.

This would also allow us to publish the static transforms for the objects once and not in each place action:

# TODO: find a better place for adding the static transforms, it shouldn't be done for each place
self.add_planning_scene_objects(self.scene)

cc @oscar-lima

@mintar
Copy link
Member

mintar commented Apr 10, 2024

+1

Another advantage: This would also visualize the planning scene in RViz right from the start, without first executing a pick action.

@oscar-lima oscar-lima changed the title Create planning scene at startup Publish planning scene at startup May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants