This package shows how to get a parallel robot working in Gazebo Sim.
Contrary to Gazebo classic, Gazebo Sim does not handle closed kinematic chains in the SDF file. Actually what is not authorized is a link having two parents (which is necessary for a closed chain, but may also be a non-closed chain).
In order to obtain a closed chain, the SDF must thus describe the robot as a tree, where all links are correctly placed.
A plugin is then used to attach two links and close the loop at runtime.
This plugin is already part of Gazebo and is designed to attach or detach a joint between two models. In our case we only attach it, and we use it on the same model:
<plugin filename="libgz-sim-detachable-joint-system.so" name="gz::sim::systems::DetachableJoint">
<parent_link>link_CD</parent_link>
<child_model>four_bar</child_model> <!-- of course I know him, it's me -->
<child_link>link_CD_closing</child_link>
<attach_topic>close_loop</attach_topic>
</plugin>
A custom plugin is also provided in this package, namely AttachLinks
. This one only takes the two link names:
<!--plugin filename="libattach-links.so" name="gz::sim::systems::AttachLinks">
<parent>link_CD</parent>
<child>link_CD_closing</child>
</plugin-->
Two examples are given, see the model
folder and the launch file.
- a four bar from the Gazebo classic example
- and a biglide that we use for teaching
The provided launch file requires simple_launch
and slider_publisher
.