Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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="" 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/ by modifying

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

  • source the gazebo file

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