Skip to content

Commit ea7efd3

Browse files
authored
MGI tutorial: declare touch_links when attaching an object (#790)
1 parent 19c9d7e commit ea7efd3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/move_group_interface/src/move_group_interface_tutorial.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -428,10 +428,10 @@ int main(int argc, char** argv)
428428
object_to_attach.operation = object_to_attach.ADD;
429429
planning_scene_interface.applyCollisionObject(object_to_attach);
430430

431-
// Then, we "attach" the object to the robot. It uses the frame_id to determine which robot link it is attached to.
432-
// You could also use applyAttachedCollisionObject to attach an object to the robot directly.
431+
// Then, we "attach" the object to the robot at the given link and allow collisions between the object and the listed
432+
// links. You could also use applyAttachedCollisionObject to attach an object to the robot directly.
433433
ROS_INFO_NAMED("tutorial", "Attach the object to the robot");
434-
move_group_interface.attachObject(object_to_attach.id, "panda_hand");
434+
move_group_interface.attachObject(object_to_attach.id, "panda_hand", { "panda_leftfinger", "panda_rightfinger" });
435435

436436
visual_tools.publishText(text_pose, "Object attached to robot", rvt::WHITE, rvt::XLARGE);
437437
visual_tools.trigger();

0 commit comments

Comments
 (0)