1
1
# ign_ros2_control
2
2
3
+ ROS2 Distro | Build Status | Package build |
4
+ :---------: | :----: | :----------: |
5
+ [ ![ Licence] ( https://img.shields.io/badge/License-Apache%202.0-blue.svg )] ( https://opensource.org/licenses/Apache-2.0 ) | [ ![ Build Status] ( http://build.ros2.org/buildStatus/icon?job=Hdev__gz_ros2_control__ubuntu_focal_amd64 )] ( http://build.ros2.org/job/Hdev__gz_ros2_control__ubuntu_focal_amd64 ) | [ ![ Build Status] ( http://build.ros2.org/buildStatus/icon?job=Hbin_uF64__gz_ros2_control__ubuntu_focal_amd64__binary )] ( http://build.ros2.org/job/Hbin_uF64__gz_ros2_control__ubuntu_focal_amd64__binary ) |
6
+
3
7
This is a ROS 2 package for integrating the ` ros2_control ` controller architecture with the [ Ignition Gazebo] ( http://ignitionrobotics.org/ ) simulator.
4
8
More information about ` ros2_control ` can be found here: https://control.ros.org/
5
9
6
10
This package provides an Ignition Gazebo system plugin which instantiates a ` ros2_control ` controller manager and connects it to a Gazebo model.
7
11
8
- Tested on:
12
+ [ ![ Build Status ] ( https://github.com/ros-controls/gz_ros2_control/actions/workflows/ci.yaml/badge.svg?branch=galactic )] ( https://github.com/ros-controls/gz_ros2_control/actions/workflows/ci.yaml )
9
13
10
- - Debs:
11
- - [ Ignition Edifice] ( https://ignitionrobotics.org/docs/edifice ) + [ ROS 2 Galactic] ( https://docs.ros.org/en/galactic/Installation.html )
12
- - From source:
13
- - [ Ignition Citadel] ( https://ignitionrobotics.org/docs/citadel ) + [ ROS 2 Galactic] ( https://docs.ros.org/en/galactic/Installation.html )
14
- - [ Ignition Fortress] ( https://ignitionrobotics.org/docs/fortress ) + [ ROS 2 Galactic] ( https://docs.ros.org/en/galactic/Installation.html )
14
+ ROS version | Gazebo version | Branch | Binaries hosted at
15
+ -- | -- | -- | --
16
+ Foxy | Citadel | [ foxy] ( https://github.com/ros-controls/gz_ros2_control/tree/foxy ) | https://packages.ros.org
17
+ Foxy | Edifice | [ foxy] ( https://github.com/ros-controls/gz_ros2_control/tree/foxy ) | only from source
18
+ Galactic | Edifice | [ galactic] ( https://github.com/ros-controls/gz_ros2_control/tree/galactic ) | https://packages.ros.org
19
+ Galactic | Fortress | [ galactic] ( https://github.com/ros-controls/gz_ros2_control/tree/galactic ) | only from source
20
+ Humble | Fortress | [ ros2] ( https://github.com/ros-controls/gz_ros2_control/tree/master ) | https://packages.ros.org
21
+ Rolling | Edifice | [ ros2] ( https://github.com/ros-controls/gz_ros2_control/tree/master ) | only from source
22
+ Rolling | Fortress | [ ros2] ( https://github.com/ros-controls/gz_ros2_control/tree/master ) | https://packages.ros.org
23
+ Rolling | Garden (not released) | [ ros2] ( https://github.com/ros-controls/gz_ros2_control/tree/master ) | only from source
15
24
16
- If you want to run this with ` ROS 2 Foxy ` please check the branch ` foxy ` .
17
25
18
26
# Compile from source
19
27
@@ -118,6 +126,38 @@ include:
118
126
</ros2_control >
119
127
```
120
128
129
+
130
+ ### Using mimic joints in simulation
131
+
132
+ To use ` mimic ` joints in ` ign_ros2_control ` you should define its parameters to your URDF.
133
+ We should include:
134
+
135
+ - ` <mimic> ` tag to the mimicked joint ([ detailed manual(https://wiki.ros.org/urdf/XML/joint ))
136
+ - ` mimic ` and ` multiplier ` parameters to joint definition in ` <ros2_control> ` tag
137
+
138
+ ``` xml
139
+ <joint name =" left_finger_joint" type =" prismatic" >
140
+ <mimic joint =" right_finger_joint" />
141
+ <axis xyz =" 0 1 0" />
142
+ <origin xyz =" 0.0 0.48 1" rpy =" 0.0 0.0 3.1415926535" />
143
+ <parent link =" base" />
144
+ <child link =" finger_left" />
145
+ <limit effort =" 1000.0" lower =" 0" upper =" 0.38" velocity =" 10" />
146
+ </joint >
147
+ ```
148
+
149
+ ``` xml
150
+ <joint name =" left_finger_joint" >
151
+ <param name =" mimic" >right_finger_joint</param >
152
+ <param name =" multiplier" >1</param >
153
+ <command_interface name =" position" />
154
+ <state_interface name =" position" />
155
+ <state_interface name =" velocity" />
156
+ <state_interface name =" effort" />
157
+ </joint >
158
+ ```
159
+
160
+
121
161
## Add the ign_ros2_control plugin
122
162
123
163
In addition to the ` ros2_control ` tags, a Gazebo plugin needs to be added to your URDF that
@@ -128,7 +168,7 @@ robot hardware interfaces between `ros2_control` and Gazebo.
128
168
129
169
``` xml
130
170
<gazebo >
131
- <plugin filename =" libign_ros2_control-system.so" name =" ign_ros2_control" >
171
+ <plugin filename =" libign_ros2_control-system.so" name =" ign_ros2_control::IgnitionROS2ControlPlugin " >
132
172
<robot_param >robot_description</robot_param >
133
173
<robot_param_node >robot_state_publisher</robot_param_node >
134
174
<parameters >$(find ign_ros2_control_demos)/config/cartpole_controller.yaml</parameters >
@@ -167,7 +207,7 @@ robot model is loaded. For example, the following XML will load the default plug
167
207
...
168
208
<ros2_control >
169
209
<gazebo >
170
- <plugin name =" ign_ros2_control" filename =" libign_ros2_control-system.so" >
210
+ <plugin name =" ign_ros2_control::IgnitionROS2ControlPlugin " filename =" libign_ros2_control-system.so" >
171
211
...
172
212
</plugin >
173
213
</gazebo >
@@ -180,7 +220,7 @@ and use the tag `<controller_manager_prefix_node_name>` to set the controller ma
180
220
181
221
``` xml
182
222
<gazebo >
183
- <plugin name =" ign_ros2_control" filename =" libign_ros2_control-system.so" >
223
+ <plugin name =" ign_ros2_control::IgnitionROS2ControlPlugin " filename =" libign_ros2_control-system.so" >
184
224
<parameters >$(find ign_ros2_control_demos)/config/cartpole_controller.yaml</parameters >
185
225
<controller_manager_prefix_node_name >controller_manager</controller_manager_prefix_node_name >
186
226
</plugin >
@@ -233,3 +273,18 @@ ros2 run ign_ros2_control_demos example_effort
233
273
ros2 run ign_ros2_control_demos example_diff_drive
234
274
ros2 run ign_ros2_control_demos example_tricycle_drive
235
275
` ` `
276
+
277
+ The following example shows parallel gripper with mimic joint :
278
+
279
+ 
280
+
281
+
282
+ ` ` ` bash
283
+ ros2 launch ign_ros2_control_demos gripper_mimic_joint_example.launch.py
284
+ ` ` `
285
+
286
+ Send example commands :
287
+
288
+ ` ` ` bash
289
+ ros2 run ign_ros2_control_demos example_gripper
290
+ ` ` `
0 commit comments