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

IRI ROS Specific Algorithm Class. More...

#include <tibi_dabo_hideandseek_alg_node.h>

Inheritance diagram for TibiDaboHideandseekAlgNode:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 TibiDaboHideandseekAlgNode (void)
 Constructor.
 ~TibiDaboHideandseekAlgNode (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  states {
  STATE_PLAYING = 0, STATE_WIN_SEEKER = 1, STATE_WIN_HIDER = 2, STATE_TIE = 3,
  STATE_IDLE = 4, STATE_FINISHED = 5
}

Private Member Functions

void joy_callback (const sensor_msgs::Joy::ConstPtr &msg)
void move_baseActive ()
void move_baseDone (const actionlib::SimpleClientGoalState &state, const move_base_msgs::MoveBaseResultConstPtr &result)
void move_baseFeedback (const move_base_msgs::MoveBaseFeedbackConstPtr &feedback)
void move_baseMakeActionRequest ()
void odom_callback (const nav_msgs::Odometry::ConstPtr &msg)
void people_callback (const iri_perception_msgs::peopleTrackingArray::ConstPtr &msg)

Private Attributes

geometry_msgs::PoseStamped basePose
int gameIteration
int gameStatus
bool hiderPoseReceived
std::vector< geometry_msgs::PointhiderPoses
CMutex joy_mutex_
ros::Subscriber joy_subscriber_
actionlib::SimpleActionClient
< move_base_msgs::MoveBaseAction
move_base_client_
move_base_msgs::MoveBaseGoal move_base_goal_
bool moveBaseActive
CMutex odom_mutex_
ros::Subscriber odom_subscriber_
bool paused
CMutex people_mutex_
ros::Subscriber people_subscriber_
std::vector< int > prev_buttons
int previousId
std::vector< double > previousXY
bool ready2Move
geometry_msgs::PoseStamped seekerGoal
geometry_msgs::PoseStamped seekerPose
bool seekerPoseReceived
tf::TransformListener tf_listener_

Static Private Attributes

static const int NUM_STATES = STATE_FINISHED-STATE_PLAYING+1

Detailed Description

IRI ROS Specific Algorithm Class.

Definition at line 47 of file tibi_dabo_hideandseek_alg_node.h.


Member Enumeration Documentation

Enumerator:
STATE_PLAYING 
STATE_WIN_SEEKER 
STATE_WIN_HIDER 
STATE_TIE 
STATE_IDLE 
STATE_FINISHED 

Definition at line 96 of file tibi_dabo_hideandseek_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 4 of file tibi_dabo_hideandseek_alg_node.cpp.

Destructor.

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

Definition at line 75 of file tibi_dabo_hideandseek_alg_node.cpp.


Member Function Documentation

void TibiDaboHideandseekAlgNode::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< TibiDaboHideandseekAlgorithm >.

Definition at line 370 of file tibi_dabo_hideandseek_alg_node.cpp.

void TibiDaboHideandseekAlgNode::joy_callback ( const sensor_msgs::Joy::ConstPtr &  msg) [private]

Definition at line 213 of file tibi_dabo_hideandseek_alg_node.cpp.

void TibiDaboHideandseekAlgNode::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< TibiDaboHideandseekAlgorithm >.

Definition at line 80 of file tibi_dabo_hideandseek_alg_node.cpp.

Definition at line 320 of file tibi_dabo_hideandseek_alg_node.cpp.

Definition at line 308 of file tibi_dabo_hideandseek_alg_node.cpp.

Definition at line 325 of file tibi_dabo_hideandseek_alg_node.cpp.

Definition at line 343 of file tibi_dabo_hideandseek_alg_node.cpp.

void TibiDaboHideandseekAlgNode::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< TibiDaboHideandseekAlgorithm >.

Definition at line 362 of file tibi_dabo_hideandseek_alg_node.cpp.

void TibiDaboHideandseekAlgNode::odom_callback ( const nav_msgs::Odometry::ConstPtr &  msg) [private]

Definition at line 265 of file tibi_dabo_hideandseek_alg_node.cpp.

Definition at line 180 of file tibi_dabo_hideandseek_alg_node.cpp.


Member Data Documentation

geometry_msgs::PoseStamped TibiDaboHideandseekAlgNode::basePose [private]

Definition at line 77 of file tibi_dabo_hideandseek_alg_node.h.

Definition at line 83 of file tibi_dabo_hideandseek_alg_node.h.

Definition at line 82 of file tibi_dabo_hideandseek_alg_node.h.

Definition at line 91 of file tibi_dabo_hideandseek_alg_node.h.

Definition at line 79 of file tibi_dabo_hideandseek_alg_node.h.

Definition at line 58 of file tibi_dabo_hideandseek_alg_node.h.

Definition at line 56 of file tibi_dabo_hideandseek_alg_node.h.

Definition at line 70 of file tibi_dabo_hideandseek_alg_node.h.

Definition at line 71 of file tibi_dabo_hideandseek_alg_node.h.

Definition at line 92 of file tibi_dabo_hideandseek_alg_node.h.

Definition at line 97 of file tibi_dabo_hideandseek_alg_node.h.

Definition at line 61 of file tibi_dabo_hideandseek_alg_node.h.

Definition at line 59 of file tibi_dabo_hideandseek_alg_node.h.

Definition at line 84 of file tibi_dabo_hideandseek_alg_node.h.

Definition at line 55 of file tibi_dabo_hideandseek_alg_node.h.

Definition at line 53 of file tibi_dabo_hideandseek_alg_node.h.

Definition at line 93 of file tibi_dabo_hideandseek_alg_node.h.

Definition at line 87 of file tibi_dabo_hideandseek_alg_node.h.

Definition at line 88 of file tibi_dabo_hideandseek_alg_node.h.

Definition at line 85 of file tibi_dabo_hideandseek_alg_node.h.

geometry_msgs::PoseStamped TibiDaboHideandseekAlgNode::seekerGoal [private]

Definition at line 81 of file tibi_dabo_hideandseek_alg_node.h.

geometry_msgs::PoseStamped TibiDaboHideandseekAlgNode::seekerPose [private]

Definition at line 80 of file tibi_dabo_hideandseek_alg_node.h.

Definition at line 90 of file tibi_dabo_hideandseek_alg_node.h.

Definition at line 94 of file tibi_dabo_hideandseek_alg_node.h.


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


tibi_dabo_hideandseek
Author(s): fherrero
autogenerated on Fri Dec 6 2013 22:12:38