semio_ros  0.10.6
semio::ros::HumanoidSourceAdapter Class Reference

Utility class to simplify the creation of semio::HumanoidSource instances. More...

#include <semio/ros/humanoid_source_adapter.h>

Public Member Functions

 HumanoidSourceAdapter (::ros::NodeHandle const &nh_rel, std::string const &default_source="fullbody")
 
HumanoidSource::Ptr getHumanoidSource (std::string const &source="param")
 Create a semio::HumanoidSource. More...
 

Protected Attributes

::ros::NodeHandle _nh_rel
 NodeHandle copy for interfacing with ROS. More...
 
std::string _default_source
 The type of source to use by default if param mode is selected and the ROS param _humanoid_source/type is not defined. More...
 

Detailed Description

Utility class to simplify the creation of semio::HumanoidSource instances.

Definition at line 15 of file humanoid_source_adapter.h.

Constructor & Destructor Documentation

semio::ros::HumanoidSourceAdapter::HumanoidSourceAdapter ( ::ros::NodeHandle const &  nh_rel,
std::string const &  default_source = "fullbody" 
)
Parameters
nh_relNodeHandle copy for interfacing with ROS.
default_sourceThe type of source to use by default if param mode is selected and the ROS param _humanoid_source/type is not defined.

Definition at line 9 of file humanoid_source_adapter.cpp.

Member Function Documentation

semio::HumanoidSource::Ptr semio::ros::HumanoidSourceAdapter::getHumanoidSource ( std::string const &  source = "param")

Create a semio::HumanoidSource.

If the ROS param _humanoid_source/filter/smoothing is defined, then a semio::HumanoidSmoothingFilter will be added to the source's filter list. See ROS Params for more info.

Parameters
sourceThe type of source to create
ValueResulting pointer typeNotes
"param"variable based on ROS paramUses the value of the ROS param _humanoid_source/type to set source; defaults to _default_source defined during construction
"nite"semio::HumanoidSourceNiTEUse Kinect V2/NiTE to source humanoids (full body, only rough head pose)
"openface"semio::HumanoidSourceOpenFaceUse OpenFace to source humanoids (head pose only)
"fullbody"semio::HumanoidSourceFullBodyMerge humanoids from Kinect V2/NiTE and OpenFace (full body, including head)
"ros"semio::ros::HumanoidSourceROSUse ROS to source humanoids
"none"semio::ros::HumanoidSourceROSSpecialization of semio::ros::HumanoidSourceROS, connects to topic /null
"virtual"semio::ros::HumanoidSourceVirtualCreate virtual humanoid that can be posed in code
Note
"none" will be used if the value of source is not recognized

ROS Params
NameTypeDefaultDescription
_humanoid_source/type string_default_sourceType of source to create when source is "param"
_humanoid_source/filter/smoothing/add anyundefinedDefine this parameter to add a default smoothing filter to incoming humanoids (when no other smoothing params are defined)
_humanoid_source/filter/smoothing/position float64undefinedThe strength of the position component of the smoothing filter
_humanoid_source/filter/smoothing/orientation float64undefinedThe strength of the orientation component of the smoothing filter
_humanoid_source/filter/smoothing/confidence float64undefinedThe strength of the confidence component of the smoothing filter
_humanoid_source/filter/smoothing/window float64undefinedThe window (duration) of the smoothing filter; 0 = use all samples
_humanoid_source/fullbody/show_cropped_image boolfalseWhether to display the cropped face image from semio::HumanoidSourceFullBody
Returns
The requested semio::HumanoidSource

Definition at line 17 of file humanoid_source_adapter.cpp.

References _default_source, _nh_rel, semio::HumanoidSmoothingFilter::getSmoothing(), semio::HumanoidStateFilter::getStandardFilterHumanoid(), and semio::HumanoidSource::Ptr.

Referenced by main().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

std::string semio::ros::HumanoidSourceAdapter::_default_source
protected

The type of source to use by default if param mode is selected and the ROS param _humanoid_source/type is not defined.

See also
getHumanoidSource()

Definition at line 21 of file humanoid_source_adapter.h.

Referenced by getHumanoidSource().

::ros::NodeHandle semio::ros::HumanoidSourceAdapter::_nh_rel
protected

NodeHandle copy for interfacing with ROS.

Definition at line 19 of file humanoid_source_adapter.h.

Referenced by getHumanoidSource().


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