ar_human_proc.h
Go to the documentation of this file.
1 /**************************************************************************************************
2  Software License Agreement (BSD License)
3 
4  Copyright (c) 2011-2013, LAR toolkit developers - University of Aveiro - http://lars.mec.ua.pt
5  All rights reserved.
6 
7  Redistribution and use in source and binary forms, with or without modification, are permitted
8  provided that the following conditions are met:
9 
10  *Redistributions of source code must retain the above copyright notice, this list of
11  conditions and the following disclaimer.
12  *Redistributions in binary form must reproduce the above copyright notice, this list of
13  conditions and the following disclaimer in the documentation and/or other materials provided
14  with the distribution.
15  *Neither the name of the University of Aveiro nor the names of its contributors may be used to
16  endorse or promote products derived from this software without specific prior written permission.
17 
18  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
19  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
21  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
24  IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 ***************************************************************************************************/
27 #ifndef HUMAN_PROC_H
28 #define HUMAN_PROC_H
29 
30 #include <ros/ros.h>
31 #include <tf/transform_broadcaster.h>
32 #include <tf/transform_listener.h>
33 
34 #include <ar_pose/ARMarkers.h>
35 #include <ar_pose/ARMarker.h>
36 // #include <ar_pose/object.h>
37 
38 #include "std_msgs/String.h"
39 
40 //#include "social_filter/humanPose.h" //this is for the msg defined
41 //#include "social_filter/humanPoses.h"
42 
43 // #include "trajectory_simulator/TrajectoryObservation.h"
44 #include "leader_follower/TrajectoryObservation.h"
45 
46 //social_filter::humanPose ped;
47 //social_filter::humanPoses list_ped;
48 // trajectory_simulator::TrajectoryObservation ghmm_wrapper;
49 ros::Publisher trajectory_pub;
52 int list_size = 10;
53 
55 // int type;
56  ros::Time detect_time;
58 };
59 
61 
62 void manage_list(int marker_id);
63 
64 double euclidean_dist(double x1,double y1,double x2, double y2){
65  double dist2 = ((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2));
66  return (sqrt(dist2));
67 }
68 
70 {
71 public:
72  ar_pose_reader(std_msgs::String topic_name, ros::NodeHandle* n);
73 // void ar_pose_callback(const ar_pose::ARMarkers::ConstPtr&);//for single marker
74  void ar_pose_callback(const ar_pose::ARMarkers::ConstPtr&); //for multi markers
75  void init();
77  ros::NodeHandle *local_n;
78  ros::Subscriber ar_pose_sub;
79  //social_filter::humanPose local_ped;
80  std_msgs::String name;
82 
83  tf::TransformListener listener;
84  geometry_msgs::PoseStamped source_pose;
85  geometry_msgs::PoseStamped target_pose;
86 };
87 
89 {
90  public:
91 
92  ar_humanProc();
93  ~ar_humanProc();
94  void init();
95  void pub();
96 // void broadcast();
97  std::vector<double> vec_x;
98  std::vector<double> vec_y;
99  std::vector<double> vec_theta;
100  std::vector<ar_pose_reader*> readers;
101 
102  protected:
103  ros::NodeHandle n;
104  ros::Publisher pose_pub;
105 // social_filter::humanPose ped;
106 // social_filter::humanPoses list_ped;
107 // ar_pose::ARMarker ar_pose_msg; //for single marker
108  ar_pose::ARMarkers ar_pose_msg; //for multi markers
109  unsigned int init_index;
110  unsigned int NoH;
111 };
112 
113 
114 #endif // HUMAN_PROC_H
115 
tf::TransformListener listener
Definition: ar_human_proc.h:83
void ar_pose_callback(const ar_pose::ARMarkers::ConstPtr &)
unsigned int init_index
ros::NodeHandle n
ros::Duration duration_since_detection
Definition: ar_human_proc.h:51
int list_size
Definition: ar_human_proc.h:52
ar_pose::ARMarkers ar_pose_msg
ros::NodeHandle * local_n
Definition: ar_human_proc.h:77
std::vector< ar_pose_reader * > readers
std::vector< double > vec_theta
Definition: ar_human_proc.h:99
ros::Publisher pose_pub
int marker_id
Definition: ar_human_proc.h:50
ros::Publisher trajectory_pub
Definition: ar_human_proc.h:49
double euclidean_dist(double x1, double y1, double x2, double y2)
Definition: ar_human_proc.h:64
std::vector< double > vec_y
Definition: ar_human_proc.h:98
std::vector< double > vec_x
Definition: ar_human_proc.h:97
ros::Subscriber ar_pose_sub
Definition: ar_human_proc.h:78
social_filter::humanPose getPose()
geometry_msgs::PoseStamped target_pose
Definition: ar_human_proc.h:85
std_msgs::String name
Definition: ar_human_proc.h:80
geometry_msgs::PoseStamped source_pose
Definition: ar_human_proc.h:84
ros::Time detect_time
Definition: ar_human_proc.h:56
trajectory_simulator::TrajectoryObservation ghmm_wrapper
Definition: ar_human_proc.h:57
int marker_type
Definition: ar_human_proc.h:50
unsigned int NoH
void manage_list(int marker_id)
ar_management markers_list[10]
Definition: ar_human_proc.h:60
ar_pose_reader(std_msgs::String topic_name, ros::NodeHandle *n)


leader_follower
Author(s): Procopio Silveira Stein
autogenerated on Mon Mar 2 2015 01:32:07