class_colision_time.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 _CLASS_COLISION_TIME_H_
28 #define _CLASS_COLISION_TIME_H_
29 
30 
36 #include <stdio.h>
37 #include <ros/ros.h>
38 #include <mtt/TargetListPC.h>
39 #include <time.h>
40 #include <sensor_msgs/PointCloud2.h>
41 #include <pcl/point_cloud.h>
42 #include <pcl/point_types.h>
43 #include <pcl/conversions.h>
44 #include <pcl_conversions/pcl_conversions.h>
45 #include <pcl_ros/transforms.h>
46 #include <tf/transform_listener.h>
47 #include <points_from_volume/points_from_volume.h>
48 // #include <atlascar_base/AtlascarStatus.h>
49 // #include <atlascar_base/AtlascarVelocityStatus.h>
50 // #include <atlascar_base/AtlascarPartialStatus.h>
51 #include <visualization_msgs/Marker.h>
52 
53 #include "ros/file_log.h"
54 #include "rosgraph_msgs/Log.h"
55 
56 #define PFLN printf("Line = %d\n", __LINE__);
57 
58 using namespace std;
59 using namespace pcl;
60 
65 {
66  public:
67 
68  struct TYPE_msg_mtt
69  {
70  int id;
71  float x;
72  float y;
73  float z;
74  float v_x;
75  float v_y;
76  float v_z;
77 
78  friend ostream& operator<< (ostream &o, const TYPE_msg_mtt &i)
79  {
80  return o
81  <<"||||||||msg_mtt||||||"<<endl
82  << "id: "<< i.id<<endl
83  << "x: "<< i.x<<endl
84  << "y: "<< i.y<<endl
85  << "z: "<< i.z<<endl
86  << "v_x: "<< i.v_x<<endl
87  << "v_y: "<< i.v_y<<endl
88  << "v_z: "<< i.v_z<<endl;
89  }
90 
91  };
92 
94  {
97  int ignition;
101  int horn;
102  int throttle;
103  int brake;
104  int clutch;
105 
106  friend ostream& operator<< (ostream &o, const TYPE_msg_partial &i)
107  {
108  return o
109  <<"||||||||msg_partial||||||"<<endl
110  << "lights_high: "<< i.lights_high<<endl
111  << "lights_medium: "<< i.lights_medium<<endl
112  << "ignition: "<< i.ignition<<endl
113  << "lights_left: "<< i.lights_left<<endl
114  << "lights_right: "<< i.lights_right<<endl
115  << "danger_lights: "<< i.danger_lights<<endl
116  << "horn: "<< i.horn<<endl
117  << "throttle: "<< i.throttle<<endl
118  << "brake: "<< i.brake<<endl
119  << "clutch: "<< i.clutch<<endl;
120  }
121  };
122 
124  {
125  float counting;
126  float pulses_sec;
128  float velocity;
129 
130  friend ostream& operator<< (ostream &o, const TYPE_msg_velocity &i)
131  {
132  return o
133  <<"||||||||msg_velocityl||||||"<<endl
134  << "counting: "<< i.counting<<endl
135  << "pulses_sec: "<< i.pulses_sec<<endl
136  << "revolutions_sec: "<< i.revolutions_sec<<endl
137  << "velocity: "<< i.velocity<<endl;
138  }
139  };
140 
141 
143  {
145  float rpm;
146 
147 
148 // friend ostream& operator<< (ostream &o, const t_parameters &i)
149  friend ostream& operator<< (ostream &o, const TYPE_msg_plc &i)
150  {
151  return o
152  <<"||||||||msg_plc||||||"<<endl
153  << "steering_wheel: "<< i.steering_wheel<<endl
154  << "rpm: "<< i.rpm<<endl;
155  }
156 
157  };
158 
159 
161  {
162  string name_file;
163 
164  //double sit_begin;
165  //double duration;
166 // double sit_end_1;
167  double bag_time;
168 
169 
170  string sit_type_1;
171  int sit_1;
174  double sit_begin_1;
175  double duration_1;
176  double sit_end_1;
177 
178  string sit_type_2;
179  int sit_2;
182  double sit_begin_2;
183  double duration_2;
184  double sit_end_2;
185 
186  string sit_type_3;
187  int sit_3;
190  double sit_begin_3;
191  double duration_3;
192  double sit_end_3;
193 
194  string sit_type_4;
195  int sit_4;
198  double sit_begin_4;
199  double duration_4;
200  double sit_end_4;
201 
202 
203 
204  friend ostream& operator<< (ostream &o, const TYPE_msg_bags &i)
205  {
206  return o
207  <<"||||||||msg_plc||||||"<<endl
208  << "name_file: "<< i.name_file<<endl
209 // << "sit_type: "<< i.sit_type<<endl
210 // << "sit_begin: "<< i.sit_begin<<endl
211 // << "duration: "<< i.duration<<endl
212 // << "sit_end: "<< i.sit_end<<endl
213  << "bag_time: "<< i.bag_time<<endl;
214  }
215 
216  };
217 
218 
219 
224  { };
225 
230  { };
231 
232 
233 // void topic_callback_partial(atlascar_base::AtlascarPartialStatus AtlascarPartialStatus_msg);
234 // //
235 // void topic_callback_velocity(atlascar_base::AtlascarVelocityStatus AtlascarVelocityStatus_msg);
236 //
237 // void topic_callback_plc_status(atlascar_base::AtlascarStatus AtlascarStatus_msg);
238 
239 // int cria_txt(void);
240 // char* TimeString();
241 
242 
243  private:
244 
245 
246 
247 
248 };
249 
250 #endif
~class_colision_time()
Class destructor.
class_colision_time()
Class constructor.
A class to detect danger situations while driving.


driver_monitoring
Author(s): Andre Oliveira
autogenerated on Mon Mar 2 2015 01:31:37