Class GazeboRosTemplate

Inheritance Relationships

Base Type

  • public gazebo::ModelPlugin

Class Documentation

class GazeboRosTemplate : public gazebo::ModelPlugin

Example ROS-powered Gazebo plugin with some useful boilerplate.

This is a ModelPlugin, but it could be any supported Gazebo plugin type, such as System, Visual, GUI, World, Sensor, etc.

Public Functions

GazeboRosTemplate()

Constructor.

virtual ~GazeboRosTemplate()

Destructor.

void Load(gazebo::physics::ModelPtr model, sdf::ElementPtr sdf) override

Gazebo calls this when the plugin is loaded.

Parameters:
  • model[in] Pointer to parent model. Other plugin types will expose different entities, such as gazebo::sensors::SensorPtr, gazebo::physics::WorldPtr, gazebo::rendering::VisualPtr, etc.

  • sdf[in] SDF element containing user-defined parameters.

Protected Functions

virtual void OnUpdate()

Optional callback to be called at every simulation iteration.