Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Static Private Attributes
ObjectDetectionAlgNode Class Reference

IRI ROS Specific Algorithm Class. More...

#include <object_detection_alg_node.h>

Inheritance diagram for ObjectDetectionAlgNode:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ObjectDetectionAlgNode (void)
 Constructor.
 ~ObjectDetectionAlgNode (void)
 Destructor.

Protected Member Functions

void addNodeDiagnostics (void)
 node add diagnostics
void mainNodeThread (void)
 main node thread
void node_config_update (Config &config, uint32_t level)
 dynamic reconfigure server callback

Private Types

enum  clients {
  TTS_ = 0, LEDS_ = 1, HEAD_ = 2, LEFT_ARM_ = 3,
  RIGHT_ARM_ = 4
}
enum  states { HOME_STATE, LOOK_STATE, DETECTION_STATE, HRI_STATE }

Private Member Functions

bool detectOject (std::string &obj_tag)
void follow_targetActive ()
void follow_targetDone (const actionlib::SimpleClientGoalState &state, const iri_nav_msgs::followTargetResultConstPtr &result)
void follow_targetFeedback (const iri_nav_msgs::followTargetFeedbackConstPtr &feedback)
void follow_targetMakeActionRequest ()
void hriActive ()
void hriDone (const actionlib::SimpleClientGoalState &state, const tibi_dabo_msgs::sequenceResultConstPtr &result)
void hriFeedback (const tibi_dabo_msgs::sequenceFeedbackConstPtr &feedback)
void hriMakeActionRequest (const std::vector< std::string > &xml_files)
void image_callback (const sensor_msgs::ImageConstPtr &msg)
void loquendoActive ()
void loquendoDone (const actionlib::SimpleClientGoalState &state, const iri_common_drivers_msgs::ttsResultConstPtr &result)
void loquendoFeedback (const iri_common_drivers_msgs::ttsFeedbackConstPtr &feedback)
void loquendoMakeActionRequest (const std::string &msg)

Private Attributes

states current_state_
cv_bridge::CvImagePtr cv_ptr
bool cv_ptr_init
actionlib::SimpleActionClient
< iri_nav_msgs::followTargetAction
follow_target_client_
iri_nav_msgs::followTargetGoal follow_target_goal_
bool head_busy
bool hri_busy
actionlib::SimpleActionClient
< tibi_dabo_msgs::sequenceAction
hri_client_
CMutex image_mutex_
image_transport::Publisher image_pub_
image_transport::Subscriber image_sub_
IplImage * ipl_scaledImage
image_transport::ImageTransport it_
actionlib::SimpleActionClient
< iri_common_drivers_msgs::ttsAction
loquendo_client_
iri_common_drivers_msgs::ttsGoal loquendo_goal_
clsParameters parameters
geometry_msgs::PoseStamped PoseStamped_msg_
ros::Publisher target_pos_publisher_

Static Private Attributes

static const unsigned int NUM_CLIENTS = RIGHT_ARM_-TTS_+1

Detailed Description

IRI ROS Specific Algorithm Class.

Definition at line 60 of file object_detection_alg_node.h.


Member Enumeration Documentation

Enumerator:
TTS_ 
LEDS_ 
HEAD_ 
LEFT_ARM_ 
RIGHT_ARM_ 

Definition at line 115 of file object_detection_alg_node.h.

Enumerator:
HOME_STATE 
LOOK_STATE 
DETECTION_STATE 
HRI_STATE 

Definition at line 112 of file object_detection_alg_node.h.


Constructor & Destructor Documentation

Constructor.

This constructor initializes specific class attributes and all ROS communications variables to enable message exchange.

Definition at line 5 of file object_detection_alg_node.cpp.

Destructor.

This destructor frees all necessary dynamic memory allocated within this this class.

Definition at line 47 of file object_detection_alg_node.cpp.


Member Function Documentation

void ObjectDetectionAlgNode::addNodeDiagnostics ( void  ) [protected, virtual]

node add diagnostics

In this abstract function additional ROS diagnostics applied to the specific algorithms may be added.

Implements algorithm_base::IriBaseAlgorithm< ObjectDetectionAlgorithm >.

Definition at line 462 of file object_detection_alg_node.cpp.

bool ObjectDetectionAlgNode::detectOject ( std::string &  obj_tag) [private]

Definition at line 130 of file object_detection_alg_node.cpp.

Definition at line 367 of file object_detection_alg_node.cpp.

Definition at line 355 of file object_detection_alg_node.cpp.

Definition at line 372 of file object_detection_alg_node.cpp.

Definition at line 437 of file object_detection_alg_node.cpp.

Definition at line 334 of file object_detection_alg_node.cpp.

Definition at line 322 of file object_detection_alg_node.cpp.

Definition at line 339 of file object_detection_alg_node.cpp.

void ObjectDetectionAlgNode::hriMakeActionRequest ( const std::vector< std::string > &  xml_files) [private]

Definition at line 413 of file object_detection_alg_node.cpp.

void ObjectDetectionAlgNode::image_callback ( const sensor_msgs::ImageConstPtr &  msg) [private]

Definition at line 267 of file object_detection_alg_node.cpp.

Definition at line 301 of file object_detection_alg_node.cpp.

Definition at line 290 of file object_detection_alg_node.cpp.

Definition at line 306 of file object_detection_alg_node.cpp.

void ObjectDetectionAlgNode::loquendoMakeActionRequest ( const std::string &  msg) [private]

Definition at line 395 of file object_detection_alg_node.cpp.

void ObjectDetectionAlgNode::mainNodeThread ( void  ) [protected, virtual]

main node thread

This is the main thread node function. Code written here will be executed in every node loop while the algorithm is on running state. Loop frequency can be tuned by modifying loop_rate attribute.

Here data related to the process loop or to ROS topics (mainly data structs related to the MSG and SRV files) must be updated. ROS publisher objects must publish their data in this process. ROS client servers may also request data to the corresponding server topics.

Implements algorithm_base::IriBaseAlgorithm< ObjectDetectionAlgorithm >.

Definition at line 53 of file object_detection_alg_node.cpp.

void ObjectDetectionAlgNode::node_config_update ( Config config,
uint32_t  level 
) [protected, virtual]

dynamic reconfigure server callback

This method is called whenever a new configuration is received through the dynamic reconfigure. The derivated generic algorithm class must implement it.

Parameters:
configan object with new configuration from all algorithm parameters defined in the config file.
levelinteger referring the level in which the configuration has been changed.

Implements algorithm_base::IriBaseAlgorithm< ObjectDetectionAlgorithm >.

Definition at line 455 of file object_detection_alg_node.cpp.


Member Data Documentation

Definition at line 113 of file object_detection_alg_node.h.

Definition at line 108 of file object_detection_alg_node.h.

Definition at line 105 of file object_detection_alg_node.h.

Definition at line 96 of file object_detection_alg_node.h.

Definition at line 97 of file object_detection_alg_node.h.

Definition at line 107 of file object_detection_alg_node.h.

Definition at line 106 of file object_detection_alg_node.h.

Definition at line 90 of file object_detection_alg_node.h.

Definition at line 74 of file object_detection_alg_node.h.

Definition at line 69 of file object_detection_alg_node.h.

Definition at line 72 of file object_detection_alg_node.h.

Definition at line 109 of file object_detection_alg_node.h.

Definition at line 64 of file object_detection_alg_node.h.

Definition at line 83 of file object_detection_alg_node.h.

Definition at line 84 of file object_detection_alg_node.h.

const unsigned int ObjectDetectionAlgNode::NUM_CLIENTS = RIGHT_ARM_-TTS_+1 [static, private]

Definition at line 116 of file object_detection_alg_node.h.

clsParameters ObjectDetectionAlgNode::parameters [private]

Definition at line 110 of file object_detection_alg_node.h.

geometry_msgs::PoseStamped ObjectDetectionAlgNode::PoseStamped_msg_ [private]

Definition at line 68 of file object_detection_alg_node.h.

Definition at line 67 of file object_detection_alg_node.h.


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


iri_object_detection
Author(s): andreu
autogenerated on Fri Dec 6 2013 23:07:42