ArrangePlugin Class Reference

#include <ArrangePlugin.hh>

Inherits WorldPlugin.

Classes

class  Object
 Class to store info about each object. More...
 

Public Types

typedef boost::shared_ptr
< WorldPlugin
TPtr
 plugin pointer type definition More...
 

Public Member Functions

 ArrangePlugin ()
 Constructor. More...
 
 ~ArrangePlugin ()
 Destructor. More...
 
void ArrangementCallback (ConstGzStringPtr &_msg)
 Callback function which receives a requested arrangement name. More...
 
std::string GetFilename () const
 Get the name of the handler. More...
 
std::string GetHandle () const
 Get the short name of the handler. More...
 
PluginType GetType () const
 Returns the type of the plugin. More...
 
virtual void Init ()
 Initialize the plugin. More...
 
virtual void Load (physics::WorldPtr _world, sdf::ElementPtr _sdf)
 Load the plugin. More...
 
virtual void Reset ()
 Reset the plugin. More...
 
bool SetArrangement (const std::string &_arrangement)
 Set up the arrangement with name given by input parameter. More...
 

Static Public Member Functions

static TPtr Create (const std::string &_filename, const std::string &_name)
 a class method that creates a plugin from a file name. More...
 

Protected Types

typedef std::map< std::string,
Pose_M
Arrangement_M
 Map of strings to Pose_M (arrangement map). More...
 
typedef std::map< std::string,
ObjectPtr
Object_M
 Map of strings to model pointers. More...
 
typedef std::shared_ptr< ObjectObjectPtr
 
typedef std::map< std::string,
ignition::math::Pose3d > 
Pose_M
 Map of strings to model poses. More...
 

Protected Attributes

Arrangement_M arrangements
 Information about arrangements. More...
 
std::string currentArrangementName
 Current arrangement name. More...
 
std::string eventTopicName
 Topic to listen on for changing arrangments. More...
 
std::string filename
 Path to the shared library file. More...
 
std::string handleName
 Short name. More...
 
std::string initialArrangementName
 Initial arrangement name. More...
 
transport::NodePtr node
 Node for Gazebo transport. More...
 
ignition::transport::Node nodeIgn
 Ignition node for Gazebo transport. More...
 
Object_M objects
 Collection of models. More...
 
sdf::ElementPtr sdf
 SDF pointer. More...
 
transport::SubscriberPtr sub
 Subscriber for listening to changing arrangements. More...
 
PluginType type
 Type of plugin. More...
 
physics::WorldPtr world
 World pointer. More...
 

Member Typedef Documentation

typedef std::map<std::string, Pose_M> Arrangement_M
protected

Map of strings to Pose_M (arrangement map).

typedef std::map<std::string, ObjectPtr> Object_M
protected

Map of strings to model pointers.

typedef std::shared_ptr<Object> ObjectPtr
protected
typedef std::map<std::string, ignition::math::Pose3d> Pose_M
protected

Map of strings to model poses.

typedef boost::shared_ptr<WorldPlugin > TPtr
inherited

plugin pointer type definition

Constructor & Destructor Documentation

Constructor.

Destructor.

Member Function Documentation

void ArrangementCallback ( ConstGzStringPtr &  _msg)

Callback function which receives a requested arrangement name.

static TPtr Create ( const std::string &  _filename,
const std::string &  _name 
)
inlinestaticinherited

a class method that creates a plugin from a file name.

It locates the shared library and loads it dynamically.

Parameters
[in]_filenamethe path to the shared library.
[in]_nameshort name of the plugin
Returns
Shared Pointer to this class type
std::string GetFilename ( ) const
inlineinherited

Get the name of the handler.

std::string GetHandle ( ) const
inlineinherited

Get the short name of the handler.

PluginType GetType ( ) const
inlineinherited

Returns the type of the plugin.

Returns
type of the plugin
virtual void Init ( )
virtual

Initialize the plugin.

Reimplemented from WorldPlugin.

virtual void Load ( physics::WorldPtr  _world,
sdf::ElementPtr  _sdf 
)
virtual

Load the plugin.

Parameters
[in]_worldPointer to world
[in]_sdfPointer to the SDF configuration.

Implements WorldPlugin.

virtual void Reset ( )
virtual

Reset the plugin.

Reimplemented from WorldPlugin.

bool SetArrangement ( const std::string &  _arrangement)

Set up the arrangement with name given by input parameter.

Parameters
[in]_arrangementName of arrangement.
Returns
True if arrangement was set successfully.

Member Data Documentation

Arrangement_M arrangements
protected

Information about arrangements.

std::string currentArrangementName
protected

Current arrangement name.

std::string eventTopicName
protected

Topic to listen on for changing arrangments.

std::string filename
protectedinherited

Path to the shared library file.

std::string handleName
protectedinherited

Short name.

std::string initialArrangementName
protected

Initial arrangement name.

transport::NodePtr node
protected

Node for Gazebo transport.

ignition::transport::Node nodeIgn
protected

Ignition node for Gazebo transport.

Object_M objects
protected

Collection of models.

sdf::ElementPtr sdf
protected

SDF pointer.

transport::SubscriberPtr sub
protected

Subscriber for listening to changing arrangements.

PluginType type
protectedinherited

Type of plugin.

Referenced by WorldPlugin::WorldPlugin().

physics::WorldPtr world
protected

World pointer.


The documentation for this class was generated from the following file: