00001
00002 #ifndef ART_MSGS_MESSAGE_OBSERVATION_H
00003 #define ART_MSGS_MESSAGE_OBSERVATION_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
00014 namespace art_msgs
00015 {
00016 template <class ContainerAllocator>
00017 struct Observation_ : public ros::Message
00018 {
00019 typedef Observation_<ContainerAllocator> Type;
00020
00021 Observation_()
00022 : oid(0)
00023 , name()
00024 , applicable(false)
00025 , clear(false)
00026 , time(0.0)
00027 , distance(0.0)
00028 , velocity(0.0)
00029 , nobjects(0)
00030 {
00031 }
00032
00033 Observation_(const ContainerAllocator& _alloc)
00034 : oid(0)
00035 , name(_alloc)
00036 , applicable(false)
00037 , clear(false)
00038 , time(0.0)
00039 , distance(0.0)
00040 , velocity(0.0)
00041 , nobjects(0)
00042 {
00043 }
00044
00045 typedef int32_t _oid_type;
00046 int32_t oid;
00047
00048 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _name_type;
00049 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > name;
00050
00051 typedef uint8_t _applicable_type;
00052 uint8_t applicable;
00053
00054 typedef uint8_t _clear_type;
00055 uint8_t clear;
00056
00057 typedef float _time_type;
00058 float time;
00059
00060 typedef float _distance_type;
00061 float distance;
00062
00063 typedef float _velocity_type;
00064 float velocity;
00065
00066 typedef int32_t _nobjects_type;
00067 int32_t nobjects;
00068
00069
00070 private:
00071 static const char* __s_getDataType_() { return "art_msgs/Observation"; }
00072 public:
00073 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00074
00075 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00076
00077 private:
00078 static const char* __s_getMD5Sum_() { return "28e00e2d00322b881a7d7e5dce0b4103"; }
00079 public:
00080 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00081
00082 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00083
00084 private:
00085 static const char* __s_getMessageDefinition_() { return "# result returned from a single observer\n\
00086 # TODO: move to a separate art_observers package\n\
00087 # $Id: Observation.msg 644 2010-09-28 03:19:07Z jack.oquin $\n\
00088 \n\
00089 int32 oid # observer ID\n\
00090 string name # observer name\n\
00091 \n\
00092 bool applicable # true if obseravation is applicable\n\
00093 bool clear # true if clear to go\n\
00094 \n\
00095 # optional time and distance to nearest obstacle\n\
00096 # (only reported by some observers)\n\
00097 float32 time\n\
00098 float32 distance\n\
00099 float32 velocity\n\
00100 int32 nobjects # number of objects\n\
00101 \n\
00102 "; }
00103 public:
00104 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00105
00106 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00107
00108 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00109 {
00110 ros::serialization::OStream stream(write_ptr, 1000000000);
00111 ros::serialization::serialize(stream, oid);
00112 ros::serialization::serialize(stream, name);
00113 ros::serialization::serialize(stream, applicable);
00114 ros::serialization::serialize(stream, clear);
00115 ros::serialization::serialize(stream, time);
00116 ros::serialization::serialize(stream, distance);
00117 ros::serialization::serialize(stream, velocity);
00118 ros::serialization::serialize(stream, nobjects);
00119 return stream.getData();
00120 }
00121
00122 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00123 {
00124 ros::serialization::IStream stream(read_ptr, 1000000000);
00125 ros::serialization::deserialize(stream, oid);
00126 ros::serialization::deserialize(stream, name);
00127 ros::serialization::deserialize(stream, applicable);
00128 ros::serialization::deserialize(stream, clear);
00129 ros::serialization::deserialize(stream, time);
00130 ros::serialization::deserialize(stream, distance);
00131 ros::serialization::deserialize(stream, velocity);
00132 ros::serialization::deserialize(stream, nobjects);
00133 return stream.getData();
00134 }
00135
00136 ROS_DEPRECATED virtual uint32_t serializationLength() const
00137 {
00138 uint32_t size = 0;
00139 size += ros::serialization::serializationLength(oid);
00140 size += ros::serialization::serializationLength(name);
00141 size += ros::serialization::serializationLength(applicable);
00142 size += ros::serialization::serializationLength(clear);
00143 size += ros::serialization::serializationLength(time);
00144 size += ros::serialization::serializationLength(distance);
00145 size += ros::serialization::serializationLength(velocity);
00146 size += ros::serialization::serializationLength(nobjects);
00147 return size;
00148 }
00149
00150 typedef boost::shared_ptr< ::art_msgs::Observation_<ContainerAllocator> > Ptr;
00151 typedef boost::shared_ptr< ::art_msgs::Observation_<ContainerAllocator> const> ConstPtr;
00152 };
00153 typedef ::art_msgs::Observation_<std::allocator<void> > Observation;
00154
00155 typedef boost::shared_ptr< ::art_msgs::Observation> ObservationPtr;
00156 typedef boost::shared_ptr< ::art_msgs::Observation const> ObservationConstPtr;
00157
00158
00159 template<typename ContainerAllocator>
00160 std::ostream& operator<<(std::ostream& s, const ::art_msgs::Observation_<ContainerAllocator> & v)
00161 {
00162 ros::message_operations::Printer< ::art_msgs::Observation_<ContainerAllocator> >::stream(s, "", v);
00163 return s;}
00164
00165 }
00166
00167 namespace ros
00168 {
00169 namespace message_traits
00170 {
00171 template<class ContainerAllocator>
00172 struct MD5Sum< ::art_msgs::Observation_<ContainerAllocator> > {
00173 static const char* value()
00174 {
00175 return "28e00e2d00322b881a7d7e5dce0b4103";
00176 }
00177
00178 static const char* value(const ::art_msgs::Observation_<ContainerAllocator> &) { return value(); }
00179 static const uint64_t static_value1 = 0x28e00e2d00322b88ULL;
00180 static const uint64_t static_value2 = 0x1a7d7e5dce0b4103ULL;
00181 };
00182
00183 template<class ContainerAllocator>
00184 struct DataType< ::art_msgs::Observation_<ContainerAllocator> > {
00185 static const char* value()
00186 {
00187 return "art_msgs/Observation";
00188 }
00189
00190 static const char* value(const ::art_msgs::Observation_<ContainerAllocator> &) { return value(); }
00191 };
00192
00193 template<class ContainerAllocator>
00194 struct Definition< ::art_msgs::Observation_<ContainerAllocator> > {
00195 static const char* value()
00196 {
00197 return "# result returned from a single observer\n\
00198 # TODO: move to a separate art_observers package\n\
00199 # $Id: Observation.msg 644 2010-09-28 03:19:07Z jack.oquin $\n\
00200 \n\
00201 int32 oid # observer ID\n\
00202 string name # observer name\n\
00203 \n\
00204 bool applicable # true if obseravation is applicable\n\
00205 bool clear # true if clear to go\n\
00206 \n\
00207 # optional time and distance to nearest obstacle\n\
00208 # (only reported by some observers)\n\
00209 float32 time\n\
00210 float32 distance\n\
00211 float32 velocity\n\
00212 int32 nobjects # number of objects\n\
00213 \n\
00214 ";
00215 }
00216
00217 static const char* value(const ::art_msgs::Observation_<ContainerAllocator> &) { return value(); }
00218 };
00219
00220 }
00221 }
00222
00223 namespace ros
00224 {
00225 namespace serialization
00226 {
00227
00228 template<class ContainerAllocator> struct Serializer< ::art_msgs::Observation_<ContainerAllocator> >
00229 {
00230 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00231 {
00232 stream.next(m.oid);
00233 stream.next(m.name);
00234 stream.next(m.applicable);
00235 stream.next(m.clear);
00236 stream.next(m.time);
00237 stream.next(m.distance);
00238 stream.next(m.velocity);
00239 stream.next(m.nobjects);
00240 }
00241
00242 ROS_DECLARE_ALLINONE_SERIALIZER;
00243 };
00244 }
00245 }
00246
00247 namespace ros
00248 {
00249 namespace message_operations
00250 {
00251
00252 template<class ContainerAllocator>
00253 struct Printer< ::art_msgs::Observation_<ContainerAllocator> >
00254 {
00255 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::art_msgs::Observation_<ContainerAllocator> & v)
00256 {
00257 s << indent << "oid: ";
00258 Printer<int32_t>::stream(s, indent + " ", v.oid);
00259 s << indent << "name: ";
00260 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.name);
00261 s << indent << "applicable: ";
00262 Printer<uint8_t>::stream(s, indent + " ", v.applicable);
00263 s << indent << "clear: ";
00264 Printer<uint8_t>::stream(s, indent + " ", v.clear);
00265 s << indent << "time: ";
00266 Printer<float>::stream(s, indent + " ", v.time);
00267 s << indent << "distance: ";
00268 Printer<float>::stream(s, indent + " ", v.distance);
00269 s << indent << "velocity: ";
00270 Printer<float>::stream(s, indent + " ", v.velocity);
00271 s << indent << "nobjects: ";
00272 Printer<int32_t>::stream(s, indent + " ", v.nobjects);
00273 }
00274 };
00275
00276
00277 }
00278 }
00279
00280 #endif // ART_MSGS_MESSAGE_OBSERVATION_H
00281