gazebo-yarp-plugins
Gazebo Plugins exposing YARP interfaces.
Loading...
Searching...
No Matches
GazeboYarpPlugins Namespace Reference

Classes

class  ClockServer
 
class  ClockServer_continueSimulation_helper
 
class  ClockServer_getSimulationTime_helper
 
class  ClockServer_getStepSize_helper
 
class  ClockServer_pauseSimulation_helper
 
class  ClockServer_resetSimulation_helper
 
class  ClockServer_resetSimulationState_helper
 
class  ClockServer_resetSimulationTime_helper
 
class  ClockServer_stepSimulation_helper
 
class  ClockServer_stepSimulationAndWait_helper
 
class  ClockServerImpl
 
class  Color
 
class  Handler
 Singleton object class. More...
 
class  LinkAttacherServer
 
class  LinkAttacherServer_attachUnscoped_helper
 
class  LinkAttacherServer_detachUnscoped_helper
 
class  LinkAttacherServer_enableGravity_helper
 
class  Pose
 
class  WorldInterfaceServer
 
class  WorldInterfaceServer_attach_helper
 
class  WorldInterfaceServer_changeColor_helper
 
class  WorldInterfaceServer_deleteAll_helper
 
class  WorldInterfaceServer_deleteObject_helper
 
class  WorldInterfaceServer_detach_helper
 
class  WorldInterfaceServer_enableCollision_helper
 
class  WorldInterfaceServer_enableGravity_helper
 
class  WorldInterfaceServer_getList_helper
 
class  WorldInterfaceServer_getPose_helper
 
class  WorldInterfaceServer_loadModelFromFile_helper
 
class  WorldInterfaceServer_loadModelFromFileWithPose_helper
 
class  WorldInterfaceServer_makeBox_helper
 
class  WorldInterfaceServer_makeCylinder_helper
 
class  WorldInterfaceServer_makeFrame_helper
 
class  WorldInterfaceServer_makeSphere_helper
 
class  WorldInterfaceServer_rename_helper
 
class  WorldInterfaceServer_setPose_helper
 

Functions

double convertDegreesToRadians (double degrees)
 convert from degrees to radians
 
double convertRadiansToDegrees (double radians)
 convert from radians to degrees
 
bool hasEnding (std::string const &fullString, std::string const &ending)
 check if a string has a certaing ending
 
std::string lastPartOfStringAfterSeparator (std::string const &fullString, std::string const &separator)
 Get last part of string after separator.
 
template<typename T >
readElementFromValue (yarp::os::Value &val)
 
template<>
double readElementFromValue< double > (yarp::os::Value &val)
 
template<>
std::string readElementFromValue< std::string > (yarp::os::Value &val)
 
template<typename T >
bool readVectorFromConfigFile (const yarp::os::Searchable &params, const std::string &listName, std::vector< T > &outputList)
 Get a vector from a parameter, using both the recommended style: nameOfList (elem1 elem2 elem3) or the deprecated (since YARP 3.10): nameOfList elem1 elem2 elem3.
 
template<typename T >
std::string vectorToString (std::vector< T > &outputList)
 Convert a vector to a string for printing.
 
std::vector< std::string > splitString (const std::string &s, const std::string &delim)
 Split a string in a vector of string given a (single char) delimiter.
 
bool loadConfigModelPlugin (gazebo::physics::ModelPtr _parent, sdf::ElementPtr _sdf, yarp::os::Property &plugin_parameters)
 Load the configuration for a given model plugin, and save the configuration in the plugin_parameters output object.
 
bool addGazeboEnviromentalVariablesModel (gazebo::physics::ModelPtr _parent, sdf::ElementPtr _sdf, yarp::os::Property &plugin_parameters)
 Add some Gazebo specific "enviromental variables" that it is possible to expand in .ini configuration file loaded using the ${variable} syntax, for writing configuration files where port names and other parameters depend on Gazebo names.
 
bool loadConfigSensorPlugin (gazebo::sensors::SensorPtr _sensor, sdf::ElementPtr _sdf, yarp::os::Property &plugin_parameters)
 Load the configuration for a given sensor plugin, and save the configuration in the plugin_parameters output object.
 
bool addGazeboEnviromentalVariablesSensor (gazebo::sensors::SensorPtr _sensor, sdf::ElementPtr _sdf, yarp::os::Property &plugin_parameters)
 Add some Gazebo specific "enviromental variables" that it is possible to expand in .ini configuration file loaded using the ${variable} syntax, for writing configuration files where port names and other parameters depend on Gazebo names.
 
bool loadConfigModelPlugin (physics::ModelPtr _model, sdf::ElementPtr _sdf, yarp::os::Property &plugin_parameters)
 
bool loadConfigSensorPlugin (sensors::SensorPtr _sensor, sdf::ElementPtr _sdf, yarp::os::Property &plugin_parameters)
 
bool startsWith (const std::string &completeString, const std::string &candidatePrefix)
 

Variables

const double yarpNetworkInitializationTimeout = 10.0
 < Seconds to wait for an answer when trying to connect to the yarpserver
 
double const pi = 3.1415926535897932384626433
 

Function Documentation

◆ convertDegreesToRadians()

double GazeboYarpPlugins::convertDegreesToRadians ( double degrees)
inline

convert from degrees to radians

Parameters
degreesangle in degrees
Returns
the angle converted in radians

◆ convertRadiansToDegrees()

double GazeboYarpPlugins::convertRadiansToDegrees ( double radians)
inline

convert from radians to degrees

Parameters
radiansangle in radians
Returns
the angle converted in degrees

◆ hasEnding()

bool GazeboYarpPlugins::hasEnding ( std::string const & fullString,
std::string const & ending )
inline

check if a string has a certaing ending

Parameters
fullStringthe full string
endingthe candidate ending
Returns
true if fullString ends with ending, false otherwise

◆ lastPartOfStringAfterSeparator()

std::string GazeboYarpPlugins::lastPartOfStringAfterSeparator ( std::string const & fullString,
std::string const & separator )
inline

Get last part of string after separator.

Parameters
[in]fullStringthe full string
[in]separatorseparator string
Returns
lastPart the last part of the string, or the fullString if the seperator is not found

◆ readElementFromValue()

template<typename T >
T GazeboYarpPlugins::readElementFromValue ( yarp::os::Value & val)
inline

◆ readElementFromValue< double >()

template<>
double GazeboYarpPlugins::readElementFromValue< double > ( yarp::os::Value & val)
inline

◆ readElementFromValue< std::string >()

template<>
std::string GazeboYarpPlugins::readElementFromValue< std::string > ( yarp::os::Value & val)
inline

◆ readVectorFromConfigFile()

template<typename T >
bool GazeboYarpPlugins::readVectorFromConfigFile ( const yarp::os::Searchable & params,
const std::string & listName,
std::vector< T > & outputList )
inline

Get a vector from a parameter, using both the recommended style: nameOfList (elem1 elem2 elem3) or the deprecated (since YARP 3.10): nameOfList elem1 elem2 elem3.

Get vector from YARP configuration

Returns
true if the parsing was successful, false otherwise

◆ vectorToString()

template<typename T >
std::string GazeboYarpPlugins::vectorToString ( std::vector< T > & outputList)
inline

Convert a vector to a string for printing.

◆ splitString()

std::vector< std::string > GazeboYarpPlugins::splitString ( const std::string & s,
const std::string & delim )

Split a string in a vector of string given a (single char) delimiter.

◆ loadConfigModelPlugin() [1/2]

bool GazeboYarpPlugins::loadConfigModelPlugin ( gazebo::physics::ModelPtr _parent,
sdf::ElementPtr _sdf,
yarp::os::Property & plugin_parameters )

Load the configuration for a given model plugin, and save the configuration in the plugin_parameters output object.

This involves calling addGazeboEnviromentalVariablesModel and then loading the yarp configuration file specified in the sdf with the yarpConfigurationFile and yarpConfigurationString tags. In case a parameter is defined in both, the yarpConfigurationString has the priority.

◆ addGazeboEnviromentalVariablesModel()

bool GazeboYarpPlugins::addGazeboEnviromentalVariablesModel ( gazebo::physics::ModelPtr _parent,
sdf::ElementPtr _sdf,
yarp::os::Property & plugin_parameters )

Add some Gazebo specific "enviromental variables" that it is possible to expand in .ini configuration file loaded using the ${variable} syntax, for writing configuration files where port names and other parameters depend on Gazebo names.

This function add some model related "enviromental variables", copying their values from some ModelPtr methods :

Yarp parameter name ModelPtr method
gazeboYarpPluginsRobotName model->GetName()
Returns
true if all went well, false otherwise

◆ loadConfigSensorPlugin() [1/2]

bool GazeboYarpPlugins::loadConfigSensorPlugin ( gazebo::sensors::SensorPtr _sensor,
sdf::ElementPtr _sdf,
yarp::os::Property & plugin_parameters )

Load the configuration for a given sensor plugin, and save the configuration in the plugin_parameters output object.

This involves calling addGazeboEnviromentalVariablesSensor and then loading the yarp configuration file specified in the sdf with the yarpConfigurationFile and yarpConfigurationString tags. In case a parameter is defined in both, the yarpConfigurationString has the priority.

◆ addGazeboEnviromentalVariablesSensor()

bool GazeboYarpPlugins::addGazeboEnviromentalVariablesSensor ( gazebo::sensors::SensorPtr _sensor,
sdf::ElementPtr _sdf,
yarp::os::Property & plugin_parameters )

Add some Gazebo specific "enviromental variables" that it is possible to expand in .ini configuration file loaded using the ${variable} syntax, for writing configuration files where port names and other parameters depend on Gazebo names.

This function add some Sensor related "enviromental variables", copying their values from some SensorPtr methods :

Yarp parameter name SensorPtr method
gazeboYarpPluginsSensorName sensor->GetName()
gazeboYarpPluginsRobotName Model name as extracted from sensor->GetScopedName()
Returns
true if all went well, false otherwise

◆ loadConfigModelPlugin() [2/2]

bool GazeboYarpPlugins::loadConfigModelPlugin ( physics::ModelPtr _model,
sdf::ElementPtr _sdf,
yarp::os::Property & plugin_parameters )

◆ loadConfigSensorPlugin() [2/2]

bool GazeboYarpPlugins::loadConfigSensorPlugin ( sensors::SensorPtr _sensor,
sdf::ElementPtr _sdf,
yarp::os::Property & plugin_parameters )

◆ startsWith()

bool GazeboYarpPlugins::startsWith ( const std::string & completeString,
const std::string & candidatePrefix )
inline

Variable Documentation

◆ yarpNetworkInitializationTimeout

const double GazeboYarpPlugins::yarpNetworkInitializationTimeout = 10.0

< Seconds to wait for an answer when trying to connect to the yarpserver

◆ pi

double const GazeboYarpPlugins::pi = 3.1415926535897932384626433