/home/laradmin/lar/demos/follow_pedestrian/src/follow_pedestrian.h File Reference

Planar scan generator. More...

#include <stdio.h>
#include <ros/ros.h>
#include <laser_geometry/laser_geometry.h>
#include <sensor_msgs/LaserScan.h>
#include <sensor_msgs/PointCloud2.h>
#include <tf/transform_listener.h>
#include <pcl_ros/transforms.h>
#include <pcl/ros/conversions.h>
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <pcl/segmentation/extract_polygonal_prism_data.h>
#include <pcl/filters/extract_indices.h>
#include <pcl/filters/project_inliers.h>
#include <visualization_msgs/Marker.h>
#include <visualization_msgs/MarkerArray.h>
#include <mtt/TargetListPC.h>
#include <atlascar_base/AtlascarCommand.h>
#include <sound_play/sound_play.h>
#include <ros/package.h>
Include dependency graph for follow_pedestrian.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  t_safety_zone
struct  t_search_area
struct  t_status
struct  t_targets

Defines

#define _SAFE_ZONE_X_MAX_   4
#define _SAFE_ZONE_X_MIN_   3.5
#define _SAFE_ZONE_Y_MAX_   0.5
#define _SAFE_ZONE_Y_MIN_   -0.5
#define _SEARCH_RADIUS_   0.3
#define _SEARCH_X_   6
#define _SEARCH_Y_   0
#define _USE_DEBUG_   1
#define DIRECTION_IN_FRONT   0
#define LIGHT_OFF   0
#define LIGHT_ON   1
#define PFLN   printf("file %s line %d\n",__FILE__,__LINE__);
#define SPEED_MOVE_SLOW   0.1
#define SPEED_STOP   0

Enumerations

enum  enum_state {
  SEARCHING, TRACKING, TRACKING_NOT_SAFE, TARGET_LOST,
  INITIALISE
}
enum  t_transitions {
  SEARCHING_2_TRACKING = 88, SEARCHING_2_TRACKING_NOT_SAFE, TRACKING_2_TARGET_LOST, TRACKING_2_TRACKING_NOT_SAFE,
  TRACKING_NOT_SAFE_2_TRACKING, TRACKING_NOT_SAFE_2_TARGET_LOST, NONE
}

Functions

void add_to_viz_markers_vec (std::vector< visualization_msgs::Marker > *marker_vec)
bool check_safety_zone (t_targets *targets, t_safety_zone *safety_zone)
void foveationcontrol (t_status *status)
void foveationcontrol_home (void)
void foveationcontrol_sweeping (void)
bool get_new_target_information (t_targets *targets, t_status *status)
void init_search_area (t_search_area *area)
bool is_safe_using_lasers (void)
void mtt_targets_cb (const mtt::TargetListPC &targetlist)
void play_sound (int sit, int mandatory, double num_h=5)
void print_status (t_status *status)
bool search_for_new_target (t_targets *targets, t_status *status, t_search_area *area)
void set_high_command_msg_direction_speed (atlascar_base::AtlascarCommand &msg, double dir, double speed)
void set_high_command_msg_lights (atlascar_base::AtlascarCommand &msg, bool high, bool medium, bool left, bool right, bool warning)
void sleepok (int t, ros::NodeHandle &nh)
void state_machine (void)

Variables

double a_h
atlascar_base::AtlascarCommand command_msg
ros::Publisher command_pub
bool FLAG_LASER_SAFE_TO_DRIVE
tf::TransformListener * p_listener
ros::NodeHandle * p_n
ros::Publisher * p_pub_fctlr
sound_play::SoundClient * p_sc
t_safety_zone safety_zone
t_search_area search_area
t_status status
t_targets targets

Detailed Description

Planar scan generator.

Author:
Miguel Oliveira
Version:
v0
Date:
2012-02-29

Definition in file follow_pedestrian.h.


Define Documentation

#define _SAFE_ZONE_X_MAX_   4

Definition at line 74 of file follow_pedestrian.h.

#define _SAFE_ZONE_X_MIN_   3.5

Definition at line 75 of file follow_pedestrian.h.

#define _SAFE_ZONE_Y_MAX_   0.5

Definition at line 76 of file follow_pedestrian.h.

#define _SAFE_ZONE_Y_MIN_   -0.5

Definition at line 77 of file follow_pedestrian.h.

#define _SEARCH_RADIUS_   0.3

Definition at line 80 of file follow_pedestrian.h.

#define _SEARCH_X_   6

Definition at line 78 of file follow_pedestrian.h.

#define _SEARCH_Y_   0

Definition at line 79 of file follow_pedestrian.h.

#define _USE_DEBUG_   1

Definition at line 65 of file follow_pedestrian.h.

#define DIRECTION_IN_FRONT   0

Definition at line 70 of file follow_pedestrian.h.

#define LIGHT_OFF   0

Definition at line 66 of file follow_pedestrian.h.

#define LIGHT_ON   1

Definition at line 67 of file follow_pedestrian.h.

#define PFLN   printf("file %s line %d\n",__FILE__,__LINE__);

Definition at line 63 of file follow_pedestrian.h.

#define SPEED_MOVE_SLOW   0.1

Definition at line 69 of file follow_pedestrian.h.

#define SPEED_STOP   0

Definition at line 68 of file follow_pedestrian.h.


Enumeration Type Documentation

enum enum_state
Enumerator:
SEARCHING 
TRACKING 
TRACKING_NOT_SAFE 
TARGET_LOST 
INITIALISE 

Definition at line 112 of file follow_pedestrian.h.

Enumerator:
SEARCHING_2_TRACKING 
SEARCHING_2_TRACKING_NOT_SAFE 
TRACKING_2_TARGET_LOST 
TRACKING_2_TRACKING_NOT_SAFE 
TRACKING_NOT_SAFE_2_TRACKING 
TRACKING_NOT_SAFE_2_TARGET_LOST 
NONE 

Definition at line 114 of file follow_pedestrian.h.


Function Documentation

void add_to_viz_markers_vec ( std::vector< visualization_msgs::Marker > *  marker_vec  ) 

Definition at line 40 of file rviz.cpp.

bool check_safety_zone ( t_targets targets,
t_safety_zone safety_zone 
)

Definition at line 156 of file follow_pedestrian.cpp.

void foveationcontrol ( t_status status  ) 

Definition at line 270 of file follow_pedestrian.cpp.

void foveationcontrol_home ( void   ) 

Definition at line 283 of file follow_pedestrian.cpp.

void foveationcontrol_sweeping ( void   ) 

Definition at line 41 of file follow_pedestrian.cpp.

bool get_new_target_information ( t_targets targets,
t_status status 
)

Definition at line 242 of file follow_pedestrian.cpp.

void init_search_area ( t_search_area area  ) 

Definition at line 262 of file follow_pedestrian.cpp.

bool is_safe_using_lasers ( void   ) 

Definition at line 72 of file follow_pedestrian.cpp.

void mtt_targets_cb ( const mtt::TargetListPC &  targetlist  ) 

Definition at line 172 of file follow_pedestrian.cpp.

void play_sound ( int  sit,
int  mandatory,
double  num_h = 5 
)

Definition at line 95 of file follow_pedestrian.cpp.

void print_status ( t_status status  ) 

Definition at line 129 of file follow_pedestrian.cpp.

bool search_for_new_target ( t_targets targets,
t_status status,
t_search_area area 
)

If the object meets all requeriments we put his information on the current target

Definition at line 216 of file follow_pedestrian.cpp.

void set_high_command_msg_direction_speed ( atlascar_base::AtlascarCommand &  msg,
double  dir,
double  speed 
)

Definition at line 297 of file follow_pedestrian.cpp.

void set_high_command_msg_lights ( atlascar_base::AtlascarCommand &  msg,
bool  high,
bool  medium,
bool  left,
bool  right,
bool  warning 
)

Definition at line 303 of file follow_pedestrian.cpp.

void sleepok ( int  t,
ros::NodeHandle &  nh 
)

Definition at line 90 of file follow_pedestrian.cpp.

void state_machine ( void   ) 

Draw the

some local variables

Tracking state machine

--------------------------------------------------------------------------- STATE MACHINE ---------------------------------------------------------------------------

---------------------------------------------------------------------------

STATE INITIALIZE

---------------------------------------------------------------------------

--- TIMER UPDATES --- //

--- STATE ACTIONS ---//

--- TRANSITIONS ---//

--- TRANSITION ACTIONS ---//

---------------------------------------------------------------------------

STATE SEARCHING

---------------------------------------------------------------------------

--- TIMER UPDATES --- //

--- STATE ACTIONS ---//

--- TRANSITIONS ---//

--- TRANSITION ACTIONS ---//

--- TRANSITION ACTIONS ---//

---------------------------------------------------------------------------

STATE TRACKING

--------------------------------------------------------------------------- --- TIMER UPDATES --- //

--- STATE ACTIONS ---//

--- TRANSITIONS ---//

--- TRANSITION ACTIONS ---//

--- TRANSITION ACTIONS ---//

--- TRANSITION ACTIONS ---//

---------------------------------------------------------------------------

TRACKING_NOT_SAFE

--------------------------------------------------------------------------- --- TIMER UPDATES --- //

--- STATE ACTIONS ---//

--- TRANSITIONS ---//

--- TRANSITION ACTIONS ---//

--- TRANSITION ACTIONS ---//

--- TRANSITION ACTIONS ---//

---------------------------------------------------------------------------

TARGET_LOST

--------------------------------------------------------------------------- --- TIMER UPDATES --- //

--- STATE ACTIONS ---//

--- TRANSITIONS ---//

---------------------------------------------------------------------------

UNKNOWN STATE

---------------------------------------------------------------------------

Definition at line 40 of file state_machine.cpp.


Variable Documentation

double a_h
atlascar_base::AtlascarCommand command_msg
ros::Publisher command_pub
tf::TransformListener* p_listener
ros::NodeHandle* p_n
ros::Publisher* p_pub_fctlr
sound_play::SoundClient* p_sc
 All Classes Files Functions Variables Enumerations Enumerator Defines


follow_pedestrian
Author(s): Miguel Oliveira, Jorge Almeida
autogenerated on Wed Jul 23 04:34:25 2014