ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Revision history [back]

All our sensor plugins have a model as their parent and try to retrieve the body by its name. All links with a fixed joint to their parent are lumped together with their parent link (or body in Gazebo taxonomy) during the conversion from urdf to gazebo - I guess in order to improve the performance. As a result, gazebo does not know the names of bodies that are rigidly attached to the canonical body.

For the plugins in the original gazebo_plugins package there is a kind of dirty hack in the urdf2gazebo parser, that silently changes the content of the bodyName tag to the name of the parent link and adds <xyz> and <rpy> tags to the config, but these tags seems to be unused in the plugin code (perhaps the tag should be named xyzOffsets and rpyOffsets?).

I think there is currently no solution to attach the sensor plugins to other (fixed) bodies than the canonical one. Indeed, the fact that they support the bodyName tag in their configuration nevertheless could be considered as a bug.

A possible workaround would be to support a link as parent instead of a model and make the controller tag a child of the link tag in urdf or use a reference attribute for the gazebo tag. The gazebo_ros_pojector plugin seems to support this somehow. I don't know if this would help for arbitrary plugins, if the body is eliminated by the urdf parser.