#include <gazebo_ros_utils.h>
|
| GazeboRos (physics::ModelPtr &_parent, sdf::ElementPtr _sdf, const std::string &_plugin) |
|
| GazeboRos (sensors::SensorPtr _parent, sdf::ElementPtr _sdf, const std::string &_plugin) |
|
physics::JointPtr | getJoint (physics::ModelPtr &_parent, const char *_tag_name, const std::string &_joint_default_name) |
|
template<class T > |
void | getParameter (T &_value, const char *_tag_name) |
|
template<class T > |
void | getParameter (T &_value, const char *_tag_name, const std::map< std::string, T > &_options) |
|
template<class T > |
void | getParameter (T &_value, const char *_tag_name, const std::map< std::string, T > &_options, const T &_default) |
|
template<class T > |
void | getParameter (T &_value, const char *_tag_name, const T &_default) |
|
void | getParameterBoolean (bool &_value, const char *_tag_name) |
|
void | getParameterBoolean (bool &_value, const char *_tag_name, const bool &_default) |
|
const char * | info () const |
|
void | isInitialized () |
|
boost::shared_ptr< ros::NodeHandle > & | node () |
|
const boost::shared_ptr< ros::NodeHandle > & | node () const |
|
std::string | resolveTF (const std::string &_name) |
|
Gazebo ros helper class The class simplifies the parameter and rosnode handling
- Author
- Markus Bader marku.nosp@m.s.ba.nosp@m.der@t.nosp@m.uwie.nosp@m.n.ac..nosp@m.at
Definition at line 109 of file gazebo_ros_utils.h.
◆ GazeboRos() [1/2]
gazebo::GazeboRos::GazeboRos |
( |
physics::ModelPtr & |
_parent, |
|
|
sdf::ElementPtr |
_sdf, |
|
|
const std::string & |
_plugin |
|
) |
| |
|
inline |
Constructor
- Parameters
-
_parent | models parent |
_sdf | sdf to read |
_name | of the plugin class |
Definition at line 129 of file gazebo_ros_utils.h.
◆ GazeboRos() [2/2]
gazebo::GazeboRos::GazeboRos |
( |
sensors::SensorPtr |
_parent, |
|
|
sdf::ElementPtr |
_sdf, |
|
|
const std::string & |
_plugin |
|
) |
| |
|
inline |
Constructor
- Parameters
-
_parent | sensor parent |
_sdf | sdf to read |
_name | of the plugin class |
Definition at line 152 of file gazebo_ros_utils.h.
◆ getJoint()
physics::JointPtr GazeboRos::getJoint |
( |
physics::ModelPtr & |
_parent, |
|
|
const char * |
_tag_name, |
|
|
const std::string & |
_joint_default_name |
|
) |
| |
retuns a JointPtr based on an sdf tag_name entry
- Parameters
-
_value | |
_tag_name | |
_joint_default_name | @retun JointPtr |
Definition at line 125 of file gazebo_ros_utils.cpp.
◆ getParameter() [1/4]
template<class T >
void gazebo::GazeboRos::getParameter |
( |
T & |
_value, |
|
|
const char * |
_tag_name |
|
) |
| |
|
inline |
reads the follwoing _tag_name paramer
- Parameters
-
_value | |
_tag_name | |
_default | @retun sdf tag value |
Definition at line 249 of file gazebo_ros_utils.h.
◆ getParameter() [2/4]
template<class T >
void gazebo::GazeboRos::getParameter |
( |
T & |
_value, |
|
|
const char * |
_tag_name, |
|
|
const std::map< std::string, T > & |
_options |
|
) |
| |
|
inline |
reads the following _tag_name paramer and compares the value with an _options map keys and retuns the corresponding value.
- Parameters
-
_value | |
_tag_name | |
_default | @retun sdf tag value |
Definition at line 281 of file gazebo_ros_utils.h.
◆ getParameter() [3/4]
template<class T >
void gazebo::GazeboRos::getParameter |
( |
T & |
_value, |
|
|
const char * |
_tag_name, |
|
|
const std::map< std::string, T > & |
_options, |
|
|
const T & |
_default |
|
) |
| |
|
inline |
reads the following _tag_name paramer and compares the value with an _options map keys and retuns the corresponding value.
- Parameters
-
_value | |
_tag_name | |
_default | @retun sdf tag value |
Definition at line 265 of file gazebo_ros_utils.h.
◆ getParameter() [4/4]
template<class T >
void gazebo::GazeboRos::getParameter |
( |
T & |
_value, |
|
|
const char * |
_tag_name, |
|
|
const T & |
_default |
|
) |
| |
|
inline |
reads the follwoing _tag_name paramer or sets a _default value
- Parameters
-
_value | |
_tag_name | |
_default | @retun sdf tag value |
Definition at line 233 of file gazebo_ros_utils.h.
◆ getParameterBoolean() [1/2]
void GazeboRos::getParameterBoolean |
( |
bool & |
_value, |
|
|
const char * |
_tag_name |
|
) |
| |
reads the follwoing _tag_name paramer
- Parameters
-
_value | |
_tag_name | @retun sdf tag value |
Definition at line 102 of file gazebo_ros_utils.cpp.
◆ getParameterBoolean() [2/2]
void GazeboRos::getParameterBoolean |
( |
bool & |
_value, |
|
|
const char * |
_tag_name, |
|
|
const bool & |
_default |
|
) |
| |
reads the follwoing _tag_name paramer or sets a _default value
- Parameters
-
_value | |
_tag_name | |
_default | @retun sdf tag value |
Definition at line 92 of file gazebo_ros_utils.cpp.
◆ info()
const char * GazeboRos::info |
( |
| ) |
const |
Returns info text used for log messages
- Returns
- class name and node name as string
Definition at line 42 of file gazebo_ros_utils.cpp.
◆ isInitialized()
void GazeboRos::isInitialized |
( |
| ) |
|
◆ node() [1/2]
returns the initialized created within the constuctor
- Returns
- rosnode
Definition at line 45 of file gazebo_ros_utils.cpp.
◆ node() [2/2]
returns the initialized within the constuctor
- Returns
- rosnode
◆ readCommonParameter()
void GazeboRos::readCommonParameter |
( |
| ) |
|
|
private |
info text for log messages to identify the node
Reads the common plugin parameters used by the constructor
Definition at line 55 of file gazebo_ros_utils.cpp.
◆ resolveTF()
std::string GazeboRos::resolveTF |
( |
const std::string & |
_name | ) |
|
resolves a tf frame name by adding the tf_prefix initialized within the constuctor
- Parameters
-
_name | @retun resolved tf name |
Definition at line 52 of file gazebo_ros_utils.cpp.
◆ info_text
std::string gazebo::GazeboRos::info_text |
|
private |
prefix for the ros tf plublisher if not set it uses the namespace_
Definition at line 117 of file gazebo_ros_utils.h.
◆ namespace_
std::string gazebo::GazeboRos::namespace_ |
|
private |
◆ plugin_
std::string gazebo::GazeboRos::plugin_ |
|
private |
◆ rosnode_
◆ sdf_
sdf::ElementPtr gazebo::GazeboRos::sdf_ |
|
private |
◆ tf_prefix_
std::string gazebo::GazeboRos::tf_prefix_ |
|
private |
The documentation for this class was generated from the following files: