semio_ros  0.10.6
semio::ros::HumanoidSourceROS Class Reference

semio::HumanoidSource to source humanoids from ROS More...

#include <semio/ros/humanoid_source_ros.h>

+ Inheritance diagram for semio::ros::HumanoidSourceROS:
+ Collaboration diagram for semio::ros::HumanoidSourceROS:

Public Types

typedef semio_msgs_ros::Humanoids _HumanoidsMsg
 ROS message for a vector of humanoids. More...
 
typedef semio_msgs_ros::Humanoid _HumanoidMsg
 ROS message for a single humanoid. More...
 
typedef semio_msgs_ros::HumanoidJoint _HumanoidJointMsg
 ROS message for a humanoid joint. More...
 

Public Member Functions

 HumanoidSourceROS (::ros::NodeHandle const &nh_rel, std::string const &topic="humanoids")
 
- Public Member Functions inherited from semio::HumanoidSource
 HumanoidSource ()
 
 HumanoidSource (__Arg &&arg, __Args &&...args)
 
HumanoidArray const & update ()
 
HumanoidArray const & get () const
 
HumanoidMultiStageFiltergetFilter ()
 
HumanoidMultiStageFilter const & getFilter () const
 
 HumanoidSource (__Arg &&arg, __Args &&...args)
 

Static Public Member Functions

static HumanoidJoint fromROSMsg (_HumanoidJointMsg const &msg)
 Create a semio::HumanoidJoint from a humanoid joint message. More...
 
static Humanoid fromROSMsg (_HumanoidMsg const &msg)
 Create a semio::Humanoid from a humanoid message. More...
 
static HumanoidArray fromROSMsg (_HumanoidsMsg const &msg)
 Create a semio::HumanoidArray from a humanoids message. More...
 

Protected Member Functions

HumanoidArray updateFromSource ()
 Convert _last_humanoids_msg to a semio::HumanoidArray. More...
 
void humanoidsCB (_HumanoidsMsg::ConstPtr const &msg)
 ROS callback for humanoids messages. More...
 

Protected Attributes

::ros::NodeHandle _nh_rel
 NodeHandle copy for interfacing with ROS. More...
 
::ros::Subscriber _humanoids_sub
 Subscriber for humanoid messages. More...
 
_HumanoidsMsg::ConstPtr _last_humanoids_msg
 ConstPtr to the last message received from ROS. More...
 
- Protected Attributes inherited from semio::HumanoidSource
HumanoidArray _humanoids
 
HumanoidMultiStageFilter _filter
 

Additional Inherited Members

- Data Fields inherited from semio::HumanoidSource
decltype(std::make_shared< HumanoidSource >()) typedef Ptr
 
decltype(std::make_shared< HumanoidSource const >()) typedef ConstPtr
 

Detailed Description

semio::HumanoidSource to source humanoids from ROS

ROS Topics
TopicTypeDescription
Subscriptions
variable; see topic param of HumanoidSourceROS()semio_msgs_ros/Humanoids_HumanoidsMsg messages to convert to semio::HumanoidArray

Definition at line 23 of file humanoid_source_ros.h.

Member Typedef Documentation

typedef semio_msgs_ros::HumanoidJoint semio::ros::HumanoidSourceROS::_HumanoidJointMsg

ROS message for a humanoid joint.

Definition at line 31 of file humanoid_source_ros.h.

typedef semio_msgs_ros::Humanoid semio::ros::HumanoidSourceROS::_HumanoidMsg

ROS message for a single humanoid.

Definition at line 29 of file humanoid_source_ros.h.

typedef semio_msgs_ros::Humanoids semio::ros::HumanoidSourceROS::_HumanoidsMsg

ROS message for a vector of humanoids.

Definition at line 27 of file humanoid_source_ros.h.

Constructor & Destructor Documentation

semio::ros::HumanoidSourceROS::HumanoidSourceROS ( ::ros::NodeHandle const &  nh_rel,
std::string const &  topic = "humanoids" 
)
Parameters
nh_relNodeHandle copy for interfacing with ROS.
topicROS topic on which to look for humanoids

Definition at line 3 of file humanoid_source_ros.cpp.

Member Function Documentation

semio::HumanoidJoint semio::ros::HumanoidSourceROS::fromROSMsg ( _HumanoidJointMsg const &  msg)
static

Create a semio::HumanoidJoint from a humanoid joint message.

Parameters
msgConstPtr to the humanoid joint message
Returns
A semio::HumanoidJoint initialized from the data in msg

Definition at line 22 of file humanoid_source_ros.cpp.

Referenced by fromROSMsg(), and updateFromSource().

+ Here is the caller graph for this function:

semio::Humanoid semio::ros::HumanoidSourceROS::fromROSMsg ( _HumanoidMsg const &  msg)
static

Create a semio::Humanoid from a humanoid message.

Parameters
msgConstPtr to the humanoid message
Returns
A semio::Humanoid initialized from the data in msg

Definition at line 32 of file humanoid_source_ros.cpp.

References fromROSMsg().

+ Here is the call graph for this function:

semio::HumanoidArray semio::ros::HumanoidSourceROS::fromROSMsg ( _HumanoidsMsg const &  msg)
static

Create a semio::HumanoidArray from a humanoids message.

Parameters
msgConstPtr to the humanoids message
Returns
A semio::HumanoidArray initialized from the data in msg

Definition at line 46 of file humanoid_source_ros.cpp.

References fromROSMsg().

+ Here is the call graph for this function:

void semio::ros::HumanoidSourceROS::humanoidsCB ( _HumanoidsMsg::ConstPtr const &  msg)
protected

ROS callback for humanoids messages.

Parameters
msgConstPtr to the humanoids message
Postcondition
_last_humanoids_msg shares ownership of message data with msg

Definition at line 59 of file humanoid_source_ros.cpp.

References _last_humanoids_msg.

semio::HumanoidArray semio::ros::HumanoidSourceROS::updateFromSource ( )
protectedvirtual

Convert _last_humanoids_msg to a semio::HumanoidArray.

Returns
_last_humanoids_msg converted to a semio::HumanoidArray
Postcondition
_last_humanoids_msg is released via _HumanoidsMsg::ConstPtr::reset()
Note
Result will be empty if _last_humanoids_msg is undefined (no messages have been received since last updateFromSource())

Implements semio::HumanoidSource.

Definition at line 11 of file humanoid_source_ros.cpp.

References _last_humanoids_msg, and fromROSMsg().

+ Here is the call graph for this function:

Field Documentation

::ros::Subscriber semio::ros::HumanoidSourceROS::_humanoids_sub
protected

Subscriber for humanoid messages.

Definition at line 37 of file humanoid_source_ros.h.

_HumanoidsMsg::ConstPtr semio::ros::HumanoidSourceROS::_last_humanoids_msg
protected

ConstPtr to the last message received from ROS.

Definition at line 39 of file humanoid_source_ros.h.

Referenced by humanoidsCB(), and updateFromSource().

::ros::NodeHandle semio::ros::HumanoidSourceROS::_nh_rel
protected

NodeHandle copy for interfacing with ROS.

Definition at line 35 of file humanoid_source_ros.h.


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