Gazebo | Ignition | Community
Ask Your Question
0

Getting the gazebo plugin p3d working (hydro)

asked 2014-01-27 08:06:56 -0600

Marcus gravatar image

Ros Hydro; Gazebo 1.9.2;

Hello guys,

The last 2 days I am trying to figure out how to get this little plugin to work:

<gazebo>
<plugin name="my_box_controller" plugin="libros_p3d.so">
  <alwaysOn>true</alwaysOn>
  <updateRate>100.0</updateRate>
  <bodyName>base_link</bodyName>
  <topicName>mObstacle_GT</topicName>
  <gaussianNoise>0.0</gaussianNoise>
  <frameName>base_link</frameName>
  <!--interface:position name="my_box_p3d_position_iface" /-->
</plugin>

</gazebo>

and this is the error that I get

Error [parser.cc:492] Required attribute[filename] in element[plugin] is not specified in SDF.

I bet I got confused with the whole URDF, XACRO, SDF stuff. I could post the rest of my code, even though it is just a box. Also, it might be worth mentioning that everything works fin when I remove the plugin.

Of course I looked at the tutorial but it was not very helpful (or did I miss something?): http://gazebosim.org/wiki/Tutorials/1.9/ROSMotorandSensorPlugins#P3D.283DPositionInterfaceforGroundTruth.29

Thanks in advance guys, Marcus

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-01-27 12:18:01 -0600

Here is an example:

<gazebo>
  <plugin name="ground_truth" filename="libgazebo_ros_p3d.so">
    <frameName>map</frameName>
    <bodyName>base_link</bodyName>
    <topicName>odom</topicName>
    <updateRate>30.0</updateRate>
  </plugin>
</gazebo>
edit flag offensive delete link more

Comments

This works perfectly. Thank you Jim.

Marcus gravatar imageMarcus ( 2014-01-28 04:27:14 -0600 )edit

that also works for me

zhenshan gravatar imagezhenshan ( 2018-09-16 22:03:48 -0600 )edit

Whenever I try using it, unfortunately, I don't any published message from Gazebo of the /odom topic. Is there any posibility of extracting the position and orientation (Odometry) from Gazebo with this plugin?

PGHowzLife gravatar imagePGHowzLife ( 2019-12-31 04:19:09 -0600 )edit

Question Tools

Stats

Asked: 2014-01-27 08:06:56 -0600

Seen: 8,336 times

Last updated: Jan 27 '14