00001 /************************************************************************************************** 00002 Software License Agreement (BSD License) 00003 00004 Copyright (c) 2011-2013, LAR toolkit developers - University of Aveiro - http://lars.mec.ua.pt 00005 All rights reserved. 00006 00007 Redistribution and use in source and binary forms, with or without modification, are permitted 00008 provided that the following conditions are met: 00009 00010 *Redistributions of source code must retain the above copyright notice, this list of 00011 conditions and the following disclaimer. 00012 *Redistributions in binary form must reproduce the above copyright notice, this list of 00013 conditions and the following disclaimer in the documentation and/or other materials provided 00014 with the distribution. 00015 *Neither the name of the University of Aveiro nor the names of its contributors may be used to 00016 endorse or promote products derived from this software without specific prior written permission. 00017 00018 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 00019 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 00020 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 00021 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00022 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00023 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 00024 IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 00025 OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00026 ***************************************************************************************************/ 00034 #ifndef _CLASS_RECOGNITION_H_ 00035 #define _CLASS_RECOGNITION_H_ 00036 00037 #include <stdio.h> 00038 #include <ros/ros.h> 00039 #include <time.h> 00040 #include <iostream> 00041 #include <string.h> 00042 #include <atlascar_base/AtlascarStatus.h> 00043 #include <atlascar_base/AtlascarVelocityStatus.h> 00044 #include <atlascar_base/AtlascarPartialStatus.h> 00045 #include "ros/file_log.h" 00046 #include "rosgraph_msgs/Log.h" 00047 #define PFLN printf("Line = %d\n", __LINE__); 00048 #include <tf/transform_listener.h> 00049 00050 00051 using namespace std; 00052 00056 class class_recognition 00057 { 00058 public: 00062 struct TYPE_msg_partial 00063 { 00064 int lights_high; 00065 int lights_medium; 00066 int ignition; 00067 int lights_left; 00068 int lights_right; 00069 int danger_lights; 00070 int horn; 00071 int throttle; 00072 int brake; 00073 int clutch; 00074 float velocity; 00075 float steering_wheel; 00076 float rpm; 00077 00078 friend ostream& operator<< (ostream &o, const TYPE_msg_partial &i) 00079 { 00080 return o 00081 <<"||||||||msg_partial||||||"<<endl 00082 << "lights_high: "<< i.lights_high<<endl 00083 << "lights_medium: "<< i.lights_medium<<endl 00084 << "ignition: "<< i.ignition<<endl 00085 << "lights_left: "<< i.lights_left<<endl 00086 << "lights_right: "<< i.lights_right<<endl 00087 << "danger_lights: "<< i.danger_lights<<endl 00088 << "horn: "<< i.horn<<endl 00089 << "throttle: "<< i.throttle<<endl 00090 << "brake: "<< i.brake<<endl 00091 << "clutch: "<< i.clutch<<endl 00092 << "velocity: "<< i.velocity<<endl 00093 << "steering_wheel: "<< i.steering_wheel<<endl 00094 << "rpm: "<< i.rpm<<endl; 00095 } 00096 }; 00097 00098 00099 00100 00104 struct TYPE_msg_bags 00105 { 00106 string name_file; 00107 double bag_time; 00108 00109 00110 00111 friend ostream& operator<< (ostream &o, const TYPE_msg_bags &i) 00112 { 00113 return o 00114 <<"||||||||msg_plc||||||"<<endl 00115 << "name_file: "<< i.name_file<<endl 00116 << "bag_time: "<< i.bag_time<<endl; 00117 } 00118 00119 }; 00120 00121 00122 00126 class_recognition() 00127 { }; 00128 00132 ~class_recognition() 00133 { }; 00134 00135 00136 private: 00137 00138 00139 00140 00141 }; 00142 00143 #endif