semio_ros  0.10.6
ExampleAttentionTargetsNode Class Reference

Example node demonstrating how to publish targets for attention recognition. More...

Public Member Functions

 ExampleAttentionTargetsNode (ros::NodeHandle &nh_rel, semio::HumanoidSource::Ptr humanoid_source_ptr, semio::HumanoidSink::Ptr humanoid_sink_ptr)
 
void publishData ()
 Publish all relevant data. More...
 
void spin ()
 Main loop. More...
 

Protected Types

typedef semio_msgs_ros::AttentionTargets _AttentionTargetsMsg
 ROS message for a vector of attention targets. More...
 
typedef semio_msgs_ros::AttentionTarget _AttentionTargetMsg
 ROS message for a single attention target. More...
 

Protected Attributes

ros::NodeHandle & _nh_rel
 NodeHandle used to interface with ROS. More...
 
ros::Publisher _attention_targets_pub
 Publisher for our attention targets. More...
 
semio::HumanoidSource::Ptr _humanoid_source_ptr
 Pointer to the input source for humanoids. More...
 
semio::HumanoidSink::Ptr _humanoid_sink_ptr
 Pointer to the output sink for humanoids. More...
 
bool _is_virtual_source
 Whether the input source is a semio::HumanoidSourceVirtual. More...
 
semio::AttentionTargetArray _attention_targets
 The list of attention targets to publish. More...
 
std::vector< TestPose_test_poses
 The list of test poses to use if _is_virtual_source == true. More...
 

Detailed Description

Example node demonstrating how to publish targets for attention recognition.

Definition at line 22 of file example_attention_targets_node.cpp.

Member Typedef Documentation

typedef semio_msgs_ros::AttentionTarget ExampleAttentionTargetsNode::_AttentionTargetMsg
protected

ROS message for a single attention target.

Definition at line 28 of file example_attention_targets_node.cpp.

typedef semio_msgs_ros::AttentionTargets ExampleAttentionTargetsNode::_AttentionTargetsMsg
protected

ROS message for a vector of attention targets.

Definition at line 26 of file example_attention_targets_node.cpp.

Constructor & Destructor Documentation

ExampleAttentionTargetsNode::ExampleAttentionTargetsNode ( ros::NodeHandle &  nh_rel,
semio::HumanoidSource::Ptr  humanoid_source_ptr,
semio::HumanoidSink::Ptr  humanoid_sink_ptr 
)
inline
Parameters
nh_relNodeHandle used to interface with ROS.
humanoid_source_ptrPointer to the input source for humanoids.
humanoid_sink_ptrPointer to the output sink for humanoids.

Definition at line 55 of file example_attention_targets_node.cpp.

Member Function Documentation

void ExampleAttentionTargetsNode::publishData ( )
inline

Publish all relevant data.

  • Publish humanoids from our input source to our output sink
  • Convert attention targets to ROS message
  • Publish attention targets

Definition at line 127 of file example_attention_targets_node.cpp.

void ExampleAttentionTargetsNode::spin ( )
inline

Main loop.

Definition at line 161 of file example_attention_targets_node.cpp.

References semio::HumanoidJoint::HEAD, semio::HumanoidJoint::NECK, and semio::HumanoidJoint::TORSO.

Referenced by main().

+ Here is the caller graph for this function:

Field Documentation

semio::AttentionTargetArray ExampleAttentionTargetsNode::_attention_targets
protected

The list of attention targets to publish.

Definition at line 44 of file example_attention_targets_node.cpp.

ros::Publisher ExampleAttentionTargetsNode::_attention_targets_pub
protected

Publisher for our attention targets.

Definition at line 33 of file example_attention_targets_node.cpp.

semio::HumanoidSink::Ptr ExampleAttentionTargetsNode::_humanoid_sink_ptr
protected

Pointer to the output sink for humanoids.

Definition at line 38 of file example_attention_targets_node.cpp.

semio::HumanoidSource::Ptr ExampleAttentionTargetsNode::_humanoid_source_ptr
protected

Pointer to the input source for humanoids.

Definition at line 36 of file example_attention_targets_node.cpp.

bool ExampleAttentionTargetsNode::_is_virtual_source
protected

Whether the input source is a semio::HumanoidSourceVirtual.

Definition at line 41 of file example_attention_targets_node.cpp.

ros::NodeHandle& ExampleAttentionTargetsNode::_nh_rel
protected

NodeHandle used to interface with ROS.

Definition at line 31 of file example_attention_targets_node.cpp.

std::vector<TestPose> ExampleAttentionTargetsNode::_test_poses
protected

The list of test poses to use if _is_virtual_source == true.

Definition at line 47 of file example_attention_targets_node.cpp.


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