Commit f091672
Suggestion for new dynamic detachable joint plugin (#533)
Added a new protobuf defn to support the `dynamic_detachable_joint` system discussed in Issue gazebosim/gz-sim#2362
NOTE: the `header` data part hasn't been implemented yet
## Test it
Adding the plugin to robot model URDF/SDF
```
<gazebo>
<plugin filename="gz-sim-dynamic-detachable-joint-system"
name="gz::sim::systems::DynamicDetachableJoint">
<parent_link>robotiq_85_left_finger_tip_link</parent_link>
<service_name>/payload/attach_detach</service_name>
<output_topic>/child_state</output_topic>
<attach_distance>0.25</attach_distance>
</plugin>
</gazebo>
```
GZ Service call command
```
# Attach
gz service -s /payload/attach_detach \
--reqtype gz.msgs.AttachDetachRequest \
--reptype gz.msgs.AttachDetachResponse \
--timeout 3000 \
--req 'child_model_name: "cube",
child_link_name: "link",
command: "attach"'
# Detach
gz service -s /payload/attach_detach \
--reqtype gz.msgs.AttachDetachRequest \
--reptype gz.msgs.AttachDetachResponse \
--timeout 2000 \
--req 'child_model_name: "cube",
child_link_name: "link",
command: "detach"'
```
ROS2 Service call command
```
# Attach
ros2 service call /payload/attach_detach \
ros_gz_interfaces/srv/AttachDetach \
"{child_model_name: 'cube',
child_link_name: 'link',
command: 'attach'}"
# Detach
ros2 service call /payload/attach_detach \
ros_gz_interfaces/srv/AttachDetach \
"{child_model_name: 'cube',
child_link_name: 'link',
command: 'detach'}"
```
Signed-off-by: Adarsh Karan Kesavadas Prasanth <adarshkaran01@gmail.com>
---------
Signed-off-by: Adarsh Karan Kesavadas Prasanth <adarshkaran01@gmail.com>
Co-authored-by: Carlos Agüero <caguero@openrobotics.org>
Co-authored-by: Arjo Chakravarty <arjoc@google.com>1 parent 8ba4207 commit f091672
2 files changed
Lines changed: 86 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
0 commit comments