| Note: For ROS Fuerte. |
Gazeb Plugin Intro
Description: A basic tutorial that shows users how to create a gazebo plugin.Tutorial Level: BEGINNER
Contents
Work in progress.
Install ROS
Install the simulator_gazebo stack.
Create a Gazebo Plugin
Create a ROS package in a scratch workspace and add its path to `ROS_PACKAGE_PATH
roscreate-pkg gazebo_tutorials gazebo
export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:`pwd`Create a very simple plugin as described here and save the file as gazebo_tutorials/src/simple_world_plugin.cpp:
#include "gazebo.h"
namespace gazebo
{
class PluginTemplate : public Plugin
{
public: PluginTemplate() : Plugin()
{
}
public: void Load( sdf::ElementPtr &_sdf )
{
};
GZ_REGISTER_PLUGIN(PluginTemplate)
};
}Update gazebo_tutorials/CMakeLists.txt by adding the following lines:
rosbuild_add_library(gazebo_tutorials src/simple_world_plugin.cpp)






