gazebo-yarp-plugins
Gazebo Plugins exposing YARP interfaces.
|
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 > | |
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 ¶ms, 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 |
|
inline |
convert from degrees to radians
degrees | angle in degrees |
|
inline |
convert from radians to degrees
radians | angle in radians |
|
inline |
check if a string has a certaing ending
fullString | the full string |
ending | the candidate ending |
|
inline |
Get last part of string after separator.
[in] | fullString | the full string |
[in] | separator | separator string |
|
inline |
|
inline |
|
inline |
|
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
|
inline |
Convert a vector to a string for printing.
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.
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.
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() |
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.
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() |
bool GazeboYarpPlugins::loadConfigModelPlugin | ( | physics::ModelPtr | _model, |
sdf::ElementPtr | _sdf, | ||
yarp::os::Property & | plugin_parameters ) |
bool GazeboYarpPlugins::loadConfigSensorPlugin | ( | sensors::SensorPtr | _sensor, |
sdf::ElementPtr | _sdf, | ||
yarp::os::Property & | plugin_parameters ) |
|
inline |
const double GazeboYarpPlugins::yarpNetworkInitializationTimeout = 10.0 |
< Seconds to wait for an answer when trying to connect to the yarpserver
double const GazeboYarpPlugins::pi = 3.1415926535897932384626433 |