gazebo-yarp-plugins
Gazebo Plugins exposing YARP interfaces.
|
The LinkAttacher is a Gazebo model plugin. It can be used to attach/detach two link of model spawned in Gazebo environment. The attachment is made by adding a joint between the links specified, with a given jointType (available joint types are those in SDF documentation with the exception of gearbox
that is not available). The link of the model we want to attach is the parent link and the link of the robot model (to which this plugin is added) becomes the child link for the newly created joint. So, the new joint is named by the model_link_name
suffixed with the phrase *_jointType_joint* in the name e.g, l_hand_fixed_joint.
Additionally, this plugin also provides control over gravity of the models spawned in Gazebo environment. Currently, this plugin is used for coupling the hands of two robots, or those robot model and human model in pHRI experiments. Also, this plugin can be used to attach objects to the robot links.
Create a .ini
configuration file defining the rpc port name for communicating with the linkattacher plugin, and defining the desired type of joint (optional: default type is fixed
).
e.g. linkattacher.ini
Now, add the following lines to the sdf model
On launching the model in Gazebo, the rpc port will be opened. Connect to this port and type help
to know the available commands.
The available commands are:
attachUnscoped <parent_model_name> <parent_model_link_name> <child_model_name> <child_model_link_name>
detachUnscoped <model_name> <link_name>
enableGravity <model_name> <enable>
(The link_name
can be both the scoped or unscoped name of the link)
It is possible to apply a set of chosen command at the startup of Gazebo. In order to do so, it is required to add a [STARTUP]
group in the .ini
file with the desired commands and argouments.
e.g.