Go to the documentation of this file.00001
00002 #ifndef ART_MSGS_MESSAGE_OBSERVATION_H
00003 #define ART_MSGS_MESSAGE_OBSERVATION_H
00004 #include <string>
00005 #include <vector>
00006 #include <map>
00007 #include <ostream>
00008 #include "ros/serialization.h"
00009 #include "ros/builtin_message_traits.h"
00010 #include "ros/message_operations.h"
00011 #include "ros/time.h"
00012
00013 #include "ros/macros.h"
00014
00015 #include "ros/assert.h"
00016
00017
00018 namespace art_msgs
00019 {
00020 template <class ContainerAllocator>
00021 struct Observation_ {
00022 typedef Observation_<ContainerAllocator> Type;
00023
00024 Observation_()
00025 : oid(0)
00026 , name()
00027 , applicable(false)
00028 , clear(false)
00029 , time(0.0)
00030 , distance(0.0)
00031 , velocity(0.0)
00032 , nobjects(0)
00033 {
00034 }
00035
00036 Observation_(const ContainerAllocator& _alloc)
00037 : oid(0)
00038 , name(_alloc)
00039 , applicable(false)
00040 , clear(false)
00041 , time(0.0)
00042 , distance(0.0)
00043 , velocity(0.0)
00044 , nobjects(0)
00045 {
00046 }
00047
00048 typedef int32_t _oid_type;
00049 int32_t oid;
00050
00051 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _name_type;
00052 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > name;
00053
00054 typedef uint8_t _applicable_type;
00055 uint8_t applicable;
00056
00057 typedef uint8_t _clear_type;
00058 uint8_t clear;
00059
00060 typedef float _time_type;
00061 float time;
00062
00063 typedef float _distance_type;
00064 float distance;
00065
00066 typedef float _velocity_type;
00067 float velocity;
00068
00069 typedef int32_t _nobjects_type;
00070 int32_t nobjects;
00071
00072 enum { Nearest_forward = 0 };
00073 enum { Nearest_backward = 1 };
00074 enum { Adjacent_left = 2 };
00075 enum { Adjacent_right = 3 };
00076 enum { All_left = 4 };
00077 enum { All_right = 5 };
00078 enum { Merge_into_nearest = 6 };
00079 enum { Merge_across_all = 7 };
00080 enum { Intersection = 8 };
00081 enum { N_Observers = 9 };
00082
00083 typedef boost::shared_ptr< ::art_msgs::Observation_<ContainerAllocator> > Ptr;
00084 typedef boost::shared_ptr< ::art_msgs::Observation_<ContainerAllocator> const> ConstPtr;
00085 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00086 };
00087 typedef ::art_msgs::Observation_<std::allocator<void> > Observation;
00088
00089 typedef boost::shared_ptr< ::art_msgs::Observation> ObservationPtr;
00090 typedef boost::shared_ptr< ::art_msgs::Observation const> ObservationConstPtr;
00091
00092
00093 template<typename ContainerAllocator>
00094 std::ostream& operator<<(std::ostream& s, const ::art_msgs::Observation_<ContainerAllocator> & v)
00095 {
00096 ros::message_operations::Printer< ::art_msgs::Observation_<ContainerAllocator> >::stream(s, "", v);
00097 return s;}
00098
00099 }
00100
00101 namespace ros
00102 {
00103 namespace message_traits
00104 {
00105 template<class ContainerAllocator> struct IsMessage< ::art_msgs::Observation_<ContainerAllocator> > : public TrueType {};
00106 template<class ContainerAllocator> struct IsMessage< ::art_msgs::Observation_<ContainerAllocator> const> : public TrueType {};
00107 template<class ContainerAllocator>
00108 struct MD5Sum< ::art_msgs::Observation_<ContainerAllocator> > {
00109 static const char* value()
00110 {
00111 return "6c2160774352970d1e5208366926f25e";
00112 }
00113
00114 static const char* value(const ::art_msgs::Observation_<ContainerAllocator> &) { return value(); }
00115 static const uint64_t static_value1 = 0x6c2160774352970dULL;
00116 static const uint64_t static_value2 = 0x1e5208366926f25eULL;
00117 };
00118
00119 template<class ContainerAllocator>
00120 struct DataType< ::art_msgs::Observation_<ContainerAllocator> > {
00121 static const char* value()
00122 {
00123 return "art_msgs/Observation";
00124 }
00125
00126 static const char* value(const ::art_msgs::Observation_<ContainerAllocator> &) { return value(); }
00127 };
00128
00129 template<class ContainerAllocator>
00130 struct Definition< ::art_msgs::Observation_<ContainerAllocator> > {
00131 static const char* value()
00132 {
00133 return "# result returned from a single observer\n\
00134 # $Id: Observation.msg 1614 2011-08-06 21:02:59Z jack.oquin $\n\
00135 \n\
00136 # possible observer ID values\n\
00137 int32 Nearest_forward = 0 # current or closest lane\n\
00138 int32 Nearest_backward = 1 \n\
00139 int32 Adjacent_left = 2 # adjacent left or right lane\n\
00140 int32 Adjacent_right = 3\n\
00141 int32 All_left = 4 # all left or right lanes\n\
00142 int32 All_right = 5\n\
00143 int32 Merge_into_nearest = 6 # merge into nearest lane on diff seg\n\
00144 int32 Merge_across_all = 7 # merge across all lanes on diff seg\n\
00145 int32 Intersection = 8 # stop sign intersection precedence\n\
00146 int32 N_Observers = 9\n\
00147 \n\
00148 int32 oid # observer ID\n\
00149 string name # observer name\n\
00150 \n\
00151 bool applicable # true if obseravation is applicable\n\
00152 bool clear # true if clear to go\n\
00153 \n\
00154 # optional time and distance to nearest obstacle\n\
00155 # (only reported by some observers)\n\
00156 float32 time\n\
00157 float32 distance\n\
00158 float32 velocity\n\
00159 int32 nobjects # number of objects\n\
00160 \n\
00161 ";
00162 }
00163
00164 static const char* value(const ::art_msgs::Observation_<ContainerAllocator> &) { return value(); }
00165 };
00166
00167 }
00168 }
00169
00170 namespace ros
00171 {
00172 namespace serialization
00173 {
00174
00175 template<class ContainerAllocator> struct Serializer< ::art_msgs::Observation_<ContainerAllocator> >
00176 {
00177 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00178 {
00179 stream.next(m.oid);
00180 stream.next(m.name);
00181 stream.next(m.applicable);
00182 stream.next(m.clear);
00183 stream.next(m.time);
00184 stream.next(m.distance);
00185 stream.next(m.velocity);
00186 stream.next(m.nobjects);
00187 }
00188
00189 ROS_DECLARE_ALLINONE_SERIALIZER;
00190 };
00191 }
00192 }
00193
00194 namespace ros
00195 {
00196 namespace message_operations
00197 {
00198
00199 template<class ContainerAllocator>
00200 struct Printer< ::art_msgs::Observation_<ContainerAllocator> >
00201 {
00202 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::art_msgs::Observation_<ContainerAllocator> & v)
00203 {
00204 s << indent << "oid: ";
00205 Printer<int32_t>::stream(s, indent + " ", v.oid);
00206 s << indent << "name: ";
00207 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.name);
00208 s << indent << "applicable: ";
00209 Printer<uint8_t>::stream(s, indent + " ", v.applicable);
00210 s << indent << "clear: ";
00211 Printer<uint8_t>::stream(s, indent + " ", v.clear);
00212 s << indent << "time: ";
00213 Printer<float>::stream(s, indent + " ", v.time);
00214 s << indent << "distance: ";
00215 Printer<float>::stream(s, indent + " ", v.distance);
00216 s << indent << "velocity: ";
00217 Printer<float>::stream(s, indent + " ", v.velocity);
00218 s << indent << "nobjects: ";
00219 Printer<int32_t>::stream(s, indent + " ", v.nobjects);
00220 }
00221 };
00222
00223
00224 }
00225 }
00226
00227 #endif // ART_MSGS_MESSAGE_OBSERVATION_H
00228