00001
00002 #ifndef ART_MSGS_MESSAGE_OBSERVERS_H
00003 #define ART_MSGS_MESSAGE_OBSERVERS_H
00004 #include <string>
00005 #include <vector>
00006 #include <ostream>
00007 #include "ros/serialization.h"
00008 #include "ros/builtin_message_traits.h"
00009 #include "ros/message_operations.h"
00010 #include "ros/message.h"
00011 #include "ros/time.h"
00012
00013 #include "std_msgs/Header.h"
00014 #include "nav_msgs/Odometry.h"
00015 #include "art_msgs/Observation.h"
00016
00017 namespace art_msgs
00018 {
00019 template <class ContainerAllocator>
00020 struct Observers_ : public ros::Message
00021 {
00022 typedef Observers_<ContainerAllocator> Type;
00023
00024 Observers_()
00025 : header()
00026 , odom()
00027 , obs()
00028 {
00029 }
00030
00031 Observers_(const ContainerAllocator& _alloc)
00032 : header(_alloc)
00033 , odom(_alloc)
00034 , obs(_alloc)
00035 {
00036 }
00037
00038 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00039 ::std_msgs::Header_<ContainerAllocator> header;
00040
00041 typedef ::nav_msgs::Odometry_<ContainerAllocator> _odom_type;
00042 ::nav_msgs::Odometry_<ContainerAllocator> odom;
00043
00044 typedef std::vector< ::art_msgs::Observation_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::art_msgs::Observation_<ContainerAllocator> >::other > _obs_type;
00045 std::vector< ::art_msgs::Observation_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::art_msgs::Observation_<ContainerAllocator> >::other > obs;
00046
00047 enum { Nearest_forward = 0 };
00048 enum { Nearest_backward = 1 };
00049 enum { Adjacent_left = 2 };
00050 enum { Adjacent_right = 3 };
00051 enum { All_left = 4 };
00052 enum { All_right = 5 };
00053 enum { Change_lanes = 6 };
00054 enum { Merge_into_nearest = 7 };
00055 enum { Merge_across_all = 8 };
00056 enum { Intersection = 9 };
00057 enum { N_Observers = 10 };
00058
00059 ROS_DEPRECATED uint32_t get_obs_size() const { return (uint32_t)obs.size(); }
00060 ROS_DEPRECATED void set_obs_size(uint32_t size) { obs.resize((size_t)size); }
00061 ROS_DEPRECATED void get_obs_vec(std::vector< ::art_msgs::Observation_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::art_msgs::Observation_<ContainerAllocator> >::other > & vec) const { vec = this->obs; }
00062 ROS_DEPRECATED void set_obs_vec(const std::vector< ::art_msgs::Observation_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::art_msgs::Observation_<ContainerAllocator> >::other > & vec) { this->obs = vec; }
00063 private:
00064 static const char* __s_getDataType_() { return "art_msgs/Observers"; }
00065 public:
00066 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00067
00068 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00069
00070 private:
00071 static const char* __s_getMD5Sum_() { return "0a372cf6f0b7d6ece7528e8f1e5e6eab"; }
00072 public:
00073 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00074
00075 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00076
00077 private:
00078 static const char* __s_getMessageDefinition_() { return "# Observations from a set of observers\n\
00079 # TODO: move to a separate art_observers package\n\
00080 # $Id: Observers.msg 644 2010-09-28 03:19:07Z jack.oquin $\n\
00081 \n\
00082 # list of observer ID values\n\
00083 int32 Nearest_forward = 0 # current or closest lane\n\
00084 int32 Nearest_backward = 1 \n\
00085 int32 Adjacent_left = 2 # adjacent lane to left\n\
00086 int32 Adjacent_right = 3 # adjacent lane to right\n\
00087 int32 All_left = 4 # all lanes to left\n\
00088 int32 All_right = 5 # all lanes to right\n\
00089 int32 Change_lanes = 6 # unused\n\
00090 int32 Merge_into_nearest = 7 # merge into nearest lane on diff seg\n\
00091 int32 Merge_across_all = 8 # merge across all lanes on diff seg\n\
00092 int32 Intersection = 9 # intersection precedence\n\
00093 int32 N_Observers = 10\n\
00094 \n\
00095 Header header\n\
00096 nav_msgs/Odometry odom # position when observations made\n\
00097 Observation[] obs # vector of observations\n\
00098 \n\
00099 ================================================================================\n\
00100 MSG: std_msgs/Header\n\
00101 # Standard metadata for higher-level stamped data types.\n\
00102 # This is generally used to communicate timestamped data \n\
00103 # in a particular coordinate frame.\n\
00104 # \n\
00105 # sequence ID: consecutively increasing ID \n\
00106 uint32 seq\n\
00107 #Two-integer timestamp that is expressed as:\n\
00108 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00109 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00110 # time-handling sugar is provided by the client library\n\
00111 time stamp\n\
00112 #Frame this data is associated with\n\
00113 # 0: no frame\n\
00114 # 1: global frame\n\
00115 string frame_id\n\
00116 \n\
00117 ================================================================================\n\
00118 MSG: nav_msgs/Odometry\n\
00119 # This represents an estimate of a position and velocity in free space. \n\
00120 # The pose in this message should be specified in the coordinate frame given by header.frame_id.\n\
00121 # The twist in this message should be specified in the coordinate frame given by the child_frame_id\n\
00122 Header header\n\
00123 string child_frame_id\n\
00124 geometry_msgs/PoseWithCovariance pose\n\
00125 geometry_msgs/TwistWithCovariance twist\n\
00126 \n\
00127 ================================================================================\n\
00128 MSG: geometry_msgs/PoseWithCovariance\n\
00129 # This represents a pose in free space with uncertainty.\n\
00130 \n\
00131 Pose pose\n\
00132 \n\
00133 # Row-major representation of the 6x6 covariance matrix\n\
00134 # The orientation parameters use a fixed-axis representation.\n\
00135 # In order, the parameters are:\n\
00136 # (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis)\n\
00137 float64[36] covariance\n\
00138 \n\
00139 ================================================================================\n\
00140 MSG: geometry_msgs/Pose\n\
00141 # A representation of pose in free space, composed of postion and orientation. \n\
00142 Point position\n\
00143 Quaternion orientation\n\
00144 \n\
00145 ================================================================================\n\
00146 MSG: geometry_msgs/Point\n\
00147 # This contains the position of a point in free space\n\
00148 float64 x\n\
00149 float64 y\n\
00150 float64 z\n\
00151 \n\
00152 ================================================================================\n\
00153 MSG: geometry_msgs/Quaternion\n\
00154 # This represents an orientation in free space in quaternion form.\n\
00155 \n\
00156 float64 x\n\
00157 float64 y\n\
00158 float64 z\n\
00159 float64 w\n\
00160 \n\
00161 ================================================================================\n\
00162 MSG: geometry_msgs/TwistWithCovariance\n\
00163 # This expresses velocity in free space with uncertianty.\n\
00164 \n\
00165 Twist twist\n\
00166 \n\
00167 # Row-major representation of the 6x6 covariance matrix\n\
00168 # The orientation parameters use a fixed-axis representation.\n\
00169 # In order, the parameters are:\n\
00170 # (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis)\n\
00171 float64[36] covariance\n\
00172 \n\
00173 ================================================================================\n\
00174 MSG: geometry_msgs/Twist\n\
00175 # This expresses velocity in free space broken into it's linear and angular parts. \n\
00176 Vector3 linear\n\
00177 Vector3 angular\n\
00178 \n\
00179 ================================================================================\n\
00180 MSG: geometry_msgs/Vector3\n\
00181 # This represents a vector in free space. \n\
00182 \n\
00183 float64 x\n\
00184 float64 y\n\
00185 float64 z\n\
00186 ================================================================================\n\
00187 MSG: art_msgs/Observation\n\
00188 # result returned from a single observer\n\
00189 # TODO: move to a separate art_observers package\n\
00190 # $Id: Observation.msg 644 2010-09-28 03:19:07Z jack.oquin $\n\
00191 \n\
00192 int32 oid # observer ID\n\
00193 string name # observer name\n\
00194 \n\
00195 bool applicable # true if obseravation is applicable\n\
00196 bool clear # true if clear to go\n\
00197 \n\
00198 # optional time and distance to nearest obstacle\n\
00199 # (only reported by some observers)\n\
00200 float32 time\n\
00201 float32 distance\n\
00202 float32 velocity\n\
00203 int32 nobjects # number of objects\n\
00204 \n\
00205 "; }
00206 public:
00207 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00208
00209 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00210
00211 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00212 {
00213 ros::serialization::OStream stream(write_ptr, 1000000000);
00214 ros::serialization::serialize(stream, header);
00215 ros::serialization::serialize(stream, odom);
00216 ros::serialization::serialize(stream, obs);
00217 return stream.getData();
00218 }
00219
00220 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00221 {
00222 ros::serialization::IStream stream(read_ptr, 1000000000);
00223 ros::serialization::deserialize(stream, header);
00224 ros::serialization::deserialize(stream, odom);
00225 ros::serialization::deserialize(stream, obs);
00226 return stream.getData();
00227 }
00228
00229 ROS_DEPRECATED virtual uint32_t serializationLength() const
00230 {
00231 uint32_t size = 0;
00232 size += ros::serialization::serializationLength(header);
00233 size += ros::serialization::serializationLength(odom);
00234 size += ros::serialization::serializationLength(obs);
00235 return size;
00236 }
00237
00238 typedef boost::shared_ptr< ::art_msgs::Observers_<ContainerAllocator> > Ptr;
00239 typedef boost::shared_ptr< ::art_msgs::Observers_<ContainerAllocator> const> ConstPtr;
00240 };
00241 typedef ::art_msgs::Observers_<std::allocator<void> > Observers;
00242
00243 typedef boost::shared_ptr< ::art_msgs::Observers> ObserversPtr;
00244 typedef boost::shared_ptr< ::art_msgs::Observers const> ObserversConstPtr;
00245
00246
00247 template<typename ContainerAllocator>
00248 std::ostream& operator<<(std::ostream& s, const ::art_msgs::Observers_<ContainerAllocator> & v)
00249 {
00250 ros::message_operations::Printer< ::art_msgs::Observers_<ContainerAllocator> >::stream(s, "", v);
00251 return s;}
00252
00253 }
00254
00255 namespace ros
00256 {
00257 namespace message_traits
00258 {
00259 template<class ContainerAllocator>
00260 struct MD5Sum< ::art_msgs::Observers_<ContainerAllocator> > {
00261 static const char* value()
00262 {
00263 return "0a372cf6f0b7d6ece7528e8f1e5e6eab";
00264 }
00265
00266 static const char* value(const ::art_msgs::Observers_<ContainerAllocator> &) { return value(); }
00267 static const uint64_t static_value1 = 0x0a372cf6f0b7d6ecULL;
00268 static const uint64_t static_value2 = 0xe7528e8f1e5e6eabULL;
00269 };
00270
00271 template<class ContainerAllocator>
00272 struct DataType< ::art_msgs::Observers_<ContainerAllocator> > {
00273 static const char* value()
00274 {
00275 return "art_msgs/Observers";
00276 }
00277
00278 static const char* value(const ::art_msgs::Observers_<ContainerAllocator> &) { return value(); }
00279 };
00280
00281 template<class ContainerAllocator>
00282 struct Definition< ::art_msgs::Observers_<ContainerAllocator> > {
00283 static const char* value()
00284 {
00285 return "# Observations from a set of observers\n\
00286 # TODO: move to a separate art_observers package\n\
00287 # $Id: Observers.msg 644 2010-09-28 03:19:07Z jack.oquin $\n\
00288 \n\
00289 # list of observer ID values\n\
00290 int32 Nearest_forward = 0 # current or closest lane\n\
00291 int32 Nearest_backward = 1 \n\
00292 int32 Adjacent_left = 2 # adjacent lane to left\n\
00293 int32 Adjacent_right = 3 # adjacent lane to right\n\
00294 int32 All_left = 4 # all lanes to left\n\
00295 int32 All_right = 5 # all lanes to right\n\
00296 int32 Change_lanes = 6 # unused\n\
00297 int32 Merge_into_nearest = 7 # merge into nearest lane on diff seg\n\
00298 int32 Merge_across_all = 8 # merge across all lanes on diff seg\n\
00299 int32 Intersection = 9 # intersection precedence\n\
00300 int32 N_Observers = 10\n\
00301 \n\
00302 Header header\n\
00303 nav_msgs/Odometry odom # position when observations made\n\
00304 Observation[] obs # vector of observations\n\
00305 \n\
00306 ================================================================================\n\
00307 MSG: std_msgs/Header\n\
00308 # Standard metadata for higher-level stamped data types.\n\
00309 # This is generally used to communicate timestamped data \n\
00310 # in a particular coordinate frame.\n\
00311 # \n\
00312 # sequence ID: consecutively increasing ID \n\
00313 uint32 seq\n\
00314 #Two-integer timestamp that is expressed as:\n\
00315 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00316 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00317 # time-handling sugar is provided by the client library\n\
00318 time stamp\n\
00319 #Frame this data is associated with\n\
00320 # 0: no frame\n\
00321 # 1: global frame\n\
00322 string frame_id\n\
00323 \n\
00324 ================================================================================\n\
00325 MSG: nav_msgs/Odometry\n\
00326 # This represents an estimate of a position and velocity in free space. \n\
00327 # The pose in this message should be specified in the coordinate frame given by header.frame_id.\n\
00328 # The twist in this message should be specified in the coordinate frame given by the child_frame_id\n\
00329 Header header\n\
00330 string child_frame_id\n\
00331 geometry_msgs/PoseWithCovariance pose\n\
00332 geometry_msgs/TwistWithCovariance twist\n\
00333 \n\
00334 ================================================================================\n\
00335 MSG: geometry_msgs/PoseWithCovariance\n\
00336 # This represents a pose in free space with uncertainty.\n\
00337 \n\
00338 Pose pose\n\
00339 \n\
00340 # Row-major representation of the 6x6 covariance matrix\n\
00341 # The orientation parameters use a fixed-axis representation.\n\
00342 # In order, the parameters are:\n\
00343 # (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis)\n\
00344 float64[36] covariance\n\
00345 \n\
00346 ================================================================================\n\
00347 MSG: geometry_msgs/Pose\n\
00348 # A representation of pose in free space, composed of postion and orientation. \n\
00349 Point position\n\
00350 Quaternion orientation\n\
00351 \n\
00352 ================================================================================\n\
00353 MSG: geometry_msgs/Point\n\
00354 # This contains the position of a point in free space\n\
00355 float64 x\n\
00356 float64 y\n\
00357 float64 z\n\
00358 \n\
00359 ================================================================================\n\
00360 MSG: geometry_msgs/Quaternion\n\
00361 # This represents an orientation in free space in quaternion form.\n\
00362 \n\
00363 float64 x\n\
00364 float64 y\n\
00365 float64 z\n\
00366 float64 w\n\
00367 \n\
00368 ================================================================================\n\
00369 MSG: geometry_msgs/TwistWithCovariance\n\
00370 # This expresses velocity in free space with uncertianty.\n\
00371 \n\
00372 Twist twist\n\
00373 \n\
00374 # Row-major representation of the 6x6 covariance matrix\n\
00375 # The orientation parameters use a fixed-axis representation.\n\
00376 # In order, the parameters are:\n\
00377 # (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis)\n\
00378 float64[36] covariance\n\
00379 \n\
00380 ================================================================================\n\
00381 MSG: geometry_msgs/Twist\n\
00382 # This expresses velocity in free space broken into it's linear and angular parts. \n\
00383 Vector3 linear\n\
00384 Vector3 angular\n\
00385 \n\
00386 ================================================================================\n\
00387 MSG: geometry_msgs/Vector3\n\
00388 # This represents a vector in free space. \n\
00389 \n\
00390 float64 x\n\
00391 float64 y\n\
00392 float64 z\n\
00393 ================================================================================\n\
00394 MSG: art_msgs/Observation\n\
00395 # result returned from a single observer\n\
00396 # TODO: move to a separate art_observers package\n\
00397 # $Id: Observation.msg 644 2010-09-28 03:19:07Z jack.oquin $\n\
00398 \n\
00399 int32 oid # observer ID\n\
00400 string name # observer name\n\
00401 \n\
00402 bool applicable # true if obseravation is applicable\n\
00403 bool clear # true if clear to go\n\
00404 \n\
00405 # optional time and distance to nearest obstacle\n\
00406 # (only reported by some observers)\n\
00407 float32 time\n\
00408 float32 distance\n\
00409 float32 velocity\n\
00410 int32 nobjects # number of objects\n\
00411 \n\
00412 ";
00413 }
00414
00415 static const char* value(const ::art_msgs::Observers_<ContainerAllocator> &) { return value(); }
00416 };
00417
00418 template<class ContainerAllocator> struct HasHeader< ::art_msgs::Observers_<ContainerAllocator> > : public TrueType {};
00419 template<class ContainerAllocator> struct HasHeader< const ::art_msgs::Observers_<ContainerAllocator> > : public TrueType {};
00420 }
00421 }
00422
00423 namespace ros
00424 {
00425 namespace serialization
00426 {
00427
00428 template<class ContainerAllocator> struct Serializer< ::art_msgs::Observers_<ContainerAllocator> >
00429 {
00430 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00431 {
00432 stream.next(m.header);
00433 stream.next(m.odom);
00434 stream.next(m.obs);
00435 }
00436
00437 ROS_DECLARE_ALLINONE_SERIALIZER;
00438 };
00439 }
00440 }
00441
00442 namespace ros
00443 {
00444 namespace message_operations
00445 {
00446
00447 template<class ContainerAllocator>
00448 struct Printer< ::art_msgs::Observers_<ContainerAllocator> >
00449 {
00450 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::art_msgs::Observers_<ContainerAllocator> & v)
00451 {
00452 s << indent << "header: ";
00453 s << std::endl;
00454 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00455 s << indent << "odom: ";
00456 s << std::endl;
00457 Printer< ::nav_msgs::Odometry_<ContainerAllocator> >::stream(s, indent + " ", v.odom);
00458 s << indent << "obs[]" << std::endl;
00459 for (size_t i = 0; i < v.obs.size(); ++i)
00460 {
00461 s << indent << " obs[" << i << "]: ";
00462 s << std::endl;
00463 s << indent;
00464 Printer< ::art_msgs::Observation_<ContainerAllocator> >::stream(s, indent + " ", v.obs[i]);
00465 }
00466 }
00467 };
00468
00469
00470 }
00471 }
00472
00473 #endif // ART_MSGS_MESSAGE_OBSERVERS_H
00474