@@ -19,26 +19,45 @@ source devel/setup.bash
1919
2020Empty world with the plugin ` libgazebo_ros_link_attacher.so ` loaded (in the * worlds* folder).
2121
22- Which provides the ` /link_attacher_node/attach_models ` topic to specify two models and their links to be attached.
22+ Which provides the ` /link_attacher_node/attach ` service to specify two models and their links to be attached.
23+
24+ And ` /link_attacher_node/detach ` service to specify two models and their links to be detached.
2325
2426![ gazebo screenshot] ( ss.png )
2527
2628# Run demo
2729
2830In another shell, be sure to do ` source devel/setup.bash ` of your workspace.
2931
30- rosrun gazebo_ros_link_attacher demo.py
32+ rosrun gazebo_ros_link_attacher spawn.py
33+
34+ Three cubes will be spawned.
35+
36+ rosrun gazebo_ros_link_attacher attach.py
37+
38+ The cubes will be attached all between themselves as (1,2), (2,3), (3,1). You can move them with the GUI and you'll see they will move together.
39+
40+ rosrun gazebo_ros_link_attacher detach.py
41+
42+ The cubes will be detached and you can move them separately again.
3143
32- This demo will spawn two boxes and link them.
44+ You can also spawn items with the GUI and run a rosservice call:
45+ ````
46+ rosservice call /link_attacher_node/attach "model_name_1: 'unit_box_1'
47+ link_name_1: 'link'
48+ model_name_2: 'unit_sphere_1'
49+ link_name_2: 'link'"
50+ ````
3351
34- You can also spawn two items with the GUI and run a rostopic pub :
52+ And same thing to detach :
3553````
36- rostopic pub /link_attacher_node/attach_models gazebo_ros_link_attacher/Attach "model_name_1: 'unit_box_1'
54+ rosservice call /link_attacher_node/detach "model_name_1: 'unit_box_1'
3755link_name_1: 'link'
3856model_name_2: 'unit_sphere_1'
3957link_name_2: 'link'"
4058````
4159
60+
4261# Current status
4362It works!
4463
0 commit comments