Gazebo Answers logo

Hello all,

I am using gazebo 1.7.1 standalone with Ros-Groovy and I want to write a plugin that works with ROS.

Actually, I wanted to recreate the plugin found @ simulator_gazebo/gazebo_plugins/src/gazebo_ros_p3d.cpp and I followed the tutorial at http://gazebosim.org/wiki/Tutorials/1.5/ros\_enabled\_model\_plugin even though it states "This tutorial may not work with Gazebo Quantal and Ros-Groovy"

When my model (with the plugin) is inserted, standalone gazebo crashes with gazebo: symbol lookup error: ../my_gazebo_plugins/lib/libmy_gazebo_ros_p3d.so: undefined symbol: _ZN2tf7resolveERKSsS. (gdb gazebo is not working)

According to the tutorial, I have created rospack.cmake, CMakeLists.txt, and GAZEBO_PLUGIN_PATH is appended. My manifest.xml includes only Also I am still using the rosbuild not catkin.

What am I missing?

Thanks in advance


Originally posted by peshala on Gazebo Answers with karma: 197 on 2013-04-24

Post score: 0


1 Answer 1


Gazebo Answers logo

Here is how I resolved the problem. I am describing the steps for GazeboRosP3D.

  • create your package just like a regular ROS package. I am still using rosbuild by the way.

  • pull the gazebo_ros_p3d.h and gazebo_ros_p3d.cpp from simulator_gazebo/gazebo_plugins and change the .cpp file to include the correct header (e.g. #include <my_gazebo_plugins/gazebo_ros_p3d.h>

  • change your CMakeLists.txt as described by @AndreiHaidu in his answer. Also, add the

     rosbuild\_add\_library(my\_gazebo\_ros\_p3d src/gazebo\_ros\_p3d.cpp)
     rosbuild\_link\_boost(my\_gazebo\_ros\_p3d thread)
  • change the manifest by adding

    <depend package="tf"> <!-- this is needed for p3d plugin -->

  • in your model.sdf add

    <plugin filename="libmy_gazebo_ros_p3d.so" name="my_gazebo_ros_p3d"> <bodyName>chassis</bodyName> <topicName>/ground_truth_odom</topicName> <alwaysOn>true</alwaysOn> <updateRate>100.0</updateRate> <gaussianNoise>0.0</gaussianNoise> <frameName>map</frameName> <xyzOffset>0 0 0</xyzOffset> <rpyOffset>0 0 0</rpyOffset> </plugin>

  • append the plugin path at /usr/share/gazebo-1.7/setup.sh by modifying

export GAZEBO_PLUGIN_PATH=/usr/lib/gazebo-1.7/plugins:<your plugin path>/my_gazebo_plugins/lib

  • source the gazebo setup.sh file

Based on the plugin, you may add different packages in the manifest.

Originally posted by peshala with karma: 197 on 2013-04-25

This answer was ACCEPTED on the original site

Post score: 1

Original comments

Comment by peshala on 2013-04-25:
also change DisconnectWorldUpdateStart to DisconnectWorldUpdateBegin in your .cpp file. This is described in https://bitbucket.org/osrf/drcsim/commits/7070d7a926eb930f0b9cd00534f38f2ecc99ced7


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.