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 private:
00084 static const char* __s_getDataType_() { return "art_msgs/Observation"; }
00085 public:
00086 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00087
00088 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00089
00090 private:
00091 static const char* __s_getMD5Sum_() { return "6c2160774352970d1e5208366926f25e"; }
00092 public:
00093 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00094
00095 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00096
00097 private:
00098 static const char* __s_getMessageDefinition_() { return "# result returned from a single observer\n\
00099 # $Id: Observation.msg 1614 2011-08-06 21:02:59Z jack.oquin $\n\
00100 \n\
00101 # possible observer ID values\n\
00102 int32 Nearest_forward = 0 # current or closest lane\n\
00103 int32 Nearest_backward = 1 \n\
00104 int32 Adjacent_left = 2 # adjacent left or right lane\n\
00105 int32 Adjacent_right = 3\n\
00106 int32 All_left = 4 # all left or right lanes\n\
00107 int32 All_right = 5\n\
00108 int32 Merge_into_nearest = 6 # merge into nearest lane on diff seg\n\
00109 int32 Merge_across_all = 7 # merge across all lanes on diff seg\n\
00110 int32 Intersection = 8 # stop sign intersection precedence\n\
00111 int32 N_Observers = 9\n\
00112 \n\
00113 int32 oid # observer ID\n\
00114 string name # observer name\n\
00115 \n\
00116 bool applicable # true if obseravation is applicable\n\
00117 bool clear # true if clear to go\n\
00118 \n\
00119 # optional time and distance to nearest obstacle\n\
00120 # (only reported by some observers)\n\
00121 float32 time\n\
00122 float32 distance\n\
00123 float32 velocity\n\
00124 int32 nobjects # number of objects\n\
00125 \n\
00126 "; }
00127 public:
00128 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00129
00130 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00131
00132 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00133 {
00134 ros::serialization::OStream stream(write_ptr, 1000000000);
00135 ros::serialization::serialize(stream, oid);
00136 ros::serialization::serialize(stream, name);
00137 ros::serialization::serialize(stream, applicable);
00138 ros::serialization::serialize(stream, clear);
00139 ros::serialization::serialize(stream, time);
00140 ros::serialization::serialize(stream, distance);
00141 ros::serialization::serialize(stream, velocity);
00142 ros::serialization::serialize(stream, nobjects);
00143 return stream.getData();
00144 }
00145
00146 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00147 {
00148 ros::serialization::IStream stream(read_ptr, 1000000000);
00149 ros::serialization::deserialize(stream, oid);
00150 ros::serialization::deserialize(stream, name);
00151 ros::serialization::deserialize(stream, applicable);
00152 ros::serialization::deserialize(stream, clear);
00153 ros::serialization::deserialize(stream, time);
00154 ros::serialization::deserialize(stream, distance);
00155 ros::serialization::deserialize(stream, velocity);
00156 ros::serialization::deserialize(stream, nobjects);
00157 return stream.getData();
00158 }
00159
00160 ROS_DEPRECATED virtual uint32_t serializationLength() const
00161 {
00162 uint32_t size = 0;
00163 size += ros::serialization::serializationLength(oid);
00164 size += ros::serialization::serializationLength(name);
00165 size += ros::serialization::serializationLength(applicable);
00166 size += ros::serialization::serializationLength(clear);
00167 size += ros::serialization::serializationLength(time);
00168 size += ros::serialization::serializationLength(distance);
00169 size += ros::serialization::serializationLength(velocity);
00170 size += ros::serialization::serializationLength(nobjects);
00171 return size;
00172 }
00173
00174 typedef boost::shared_ptr< ::art_msgs::Observation_<ContainerAllocator> > Ptr;
00175 typedef boost::shared_ptr< ::art_msgs::Observation_<ContainerAllocator> const> ConstPtr;
00176 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00177 };
00178 typedef ::art_msgs::Observation_<std::allocator<void> > Observation;
00179
00180 typedef boost::shared_ptr< ::art_msgs::Observation> ObservationPtr;
00181 typedef boost::shared_ptr< ::art_msgs::Observation const> ObservationConstPtr;
00182
00183
00184 template<typename ContainerAllocator>
00185 std::ostream& operator<<(std::ostream& s, const ::art_msgs::Observation_<ContainerAllocator> & v)
00186 {
00187 ros::message_operations::Printer< ::art_msgs::Observation_<ContainerAllocator> >::stream(s, "", v);
00188 return s;}
00189
00190 }
00191
00192 namespace ros
00193 {
00194 namespace message_traits
00195 {
00196 template<class ContainerAllocator> struct IsMessage< ::art_msgs::Observation_<ContainerAllocator> > : public TrueType {};
00197 template<class ContainerAllocator> struct IsMessage< ::art_msgs::Observation_<ContainerAllocator> const> : public TrueType {};
00198 template<class ContainerAllocator>
00199 struct MD5Sum< ::art_msgs::Observation_<ContainerAllocator> > {
00200 static const char* value()
00201 {
00202 return "6c2160774352970d1e5208366926f25e";
00203 }
00204
00205 static const char* value(const ::art_msgs::Observation_<ContainerAllocator> &) { return value(); }
00206 static const uint64_t static_value1 = 0x6c2160774352970dULL;
00207 static const uint64_t static_value2 = 0x1e5208366926f25eULL;
00208 };
00209
00210 template<class ContainerAllocator>
00211 struct DataType< ::art_msgs::Observation_<ContainerAllocator> > {
00212 static const char* value()
00213 {
00214 return "art_msgs/Observation";
00215 }
00216
00217 static const char* value(const ::art_msgs::Observation_<ContainerAllocator> &) { return value(); }
00218 };
00219
00220 template<class ContainerAllocator>
00221 struct Definition< ::art_msgs::Observation_<ContainerAllocator> > {
00222 static const char* value()
00223 {
00224 return "# result returned from a single observer\n\
00225 # $Id: Observation.msg 1614 2011-08-06 21:02:59Z jack.oquin $\n\
00226 \n\
00227 # possible observer ID values\n\
00228 int32 Nearest_forward = 0 # current or closest lane\n\
00229 int32 Nearest_backward = 1 \n\
00230 int32 Adjacent_left = 2 # adjacent left or right lane\n\
00231 int32 Adjacent_right = 3\n\
00232 int32 All_left = 4 # all left or right lanes\n\
00233 int32 All_right = 5\n\
00234 int32 Merge_into_nearest = 6 # merge into nearest lane on diff seg\n\
00235 int32 Merge_across_all = 7 # merge across all lanes on diff seg\n\
00236 int32 Intersection = 8 # stop sign intersection precedence\n\
00237 int32 N_Observers = 9\n\
00238 \n\
00239 int32 oid # observer ID\n\
00240 string name # observer name\n\
00241 \n\
00242 bool applicable # true if obseravation is applicable\n\
00243 bool clear # true if clear to go\n\
00244 \n\
00245 # optional time and distance to nearest obstacle\n\
00246 # (only reported by some observers)\n\
00247 float32 time\n\
00248 float32 distance\n\
00249 float32 velocity\n\
00250 int32 nobjects # number of objects\n\
00251 \n\
00252 ";
00253 }
00254
00255 static const char* value(const ::art_msgs::Observation_<ContainerAllocator> &) { return value(); }
00256 };
00257
00258 }
00259 }
00260
00261 namespace ros
00262 {
00263 namespace serialization
00264 {
00265
00266 template<class ContainerAllocator> struct Serializer< ::art_msgs::Observation_<ContainerAllocator> >
00267 {
00268 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00269 {
00270 stream.next(m.oid);
00271 stream.next(m.name);
00272 stream.next(m.applicable);
00273 stream.next(m.clear);
00274 stream.next(m.time);
00275 stream.next(m.distance);
00276 stream.next(m.velocity);
00277 stream.next(m.nobjects);
00278 }
00279
00280 ROS_DECLARE_ALLINONE_SERIALIZER;
00281 };
00282 }
00283 }
00284
00285 namespace ros
00286 {
00287 namespace message_operations
00288 {
00289
00290 template<class ContainerAllocator>
00291 struct Printer< ::art_msgs::Observation_<ContainerAllocator> >
00292 {
00293 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::art_msgs::Observation_<ContainerAllocator> & v)
00294 {
00295 s << indent << "oid: ";
00296 Printer<int32_t>::stream(s, indent + " ", v.oid);
00297 s << indent << "name: ";
00298 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.name);
00299 s << indent << "applicable: ";
00300 Printer<uint8_t>::stream(s, indent + " ", v.applicable);
00301 s << indent << "clear: ";
00302 Printer<uint8_t>::stream(s, indent + " ", v.clear);
00303 s << indent << "time: ";
00304 Printer<float>::stream(s, indent + " ", v.time);
00305 s << indent << "distance: ";
00306 Printer<float>::stream(s, indent + " ", v.distance);
00307 s << indent << "velocity: ";
00308 Printer<float>::stream(s, indent + " ", v.velocity);
00309 s << indent << "nobjects: ";
00310 Printer<int32_t>::stream(s, indent + " ", v.nobjects);
00311 }
00312 };
00313
00314
00315 }
00316 }
00317
00318 #endif // ART_MSGS_MESSAGE_OBSERVATION_H
00319