ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Cannot change bodyName of GazeboRosImu in hector_gazebo_plugins [closed]

asked 2012-11-01 23:34:20 -0500

ChickenSoup gravatar image

updated 2016-05-17 02:40:46 -0500

Hi all,

This question is actually related to http://answers.ros.org/question/44732...

So, apparently the plugin works only when <bodyname>base_footprint</bodyname> and fails when a custom body name is given.

I am using ros-electric.

The error is at -> ROS_FATAL("gazebo_ros_imu plugin error: bodyName: %s does not exist\n",bodyName.c_str());

Tried debugging the plugin but with no luck. Any help would be appreciated.

Thank you

CS

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Martin Günther
close date 2016-05-17 03:26:30.518839

1 Answer

Sort by » oldest newest most voted
1

answered 2012-11-02 03:25:09 -0500

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.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2012-11-01 23:34:20 -0500

Seen: 1,272 times

Last updated: May 17 '16