$search
00001 /* Auto-generated by genmsg_cpp for file /home/rosbuild/hudson/workspace/doc-electric-common_msgs/doc_stacks/2013-03-01_14-58-52.505545/common_msgs/sensor_msgs/msg/Range.msg */ 00002 #ifndef SENSOR_MSGS_MESSAGE_RANGE_H 00003 #define SENSOR_MSGS_MESSAGE_RANGE_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 #include "std_msgs/Header.h" 00018 00019 namespace sensor_msgs 00020 { 00021 template <class ContainerAllocator> 00022 struct Range_ { 00023 typedef Range_<ContainerAllocator> Type; 00024 00025 Range_() 00026 : header() 00027 , radiation_type(0) 00028 , field_of_view(0.0) 00029 , min_range(0.0) 00030 , max_range(0.0) 00031 , range(0.0) 00032 { 00033 } 00034 00035 Range_(const ContainerAllocator& _alloc) 00036 : header(_alloc) 00037 , radiation_type(0) 00038 , field_of_view(0.0) 00039 , min_range(0.0) 00040 , max_range(0.0) 00041 , range(0.0) 00042 { 00043 } 00044 00045 typedef ::std_msgs::Header_<ContainerAllocator> _header_type; 00046 ::std_msgs::Header_<ContainerAllocator> header; 00047 00048 typedef uint8_t _radiation_type_type; 00049 uint8_t radiation_type; 00050 00051 typedef float _field_of_view_type; 00052 float field_of_view; 00053 00054 typedef float _min_range_type; 00055 float min_range; 00056 00057 typedef float _max_range_type; 00058 float max_range; 00059 00060 typedef float _range_type; 00061 float range; 00062 00063 enum { ULTRASOUND = 0 }; 00064 enum { INFRARED = 1 }; 00065 00066 private: 00067 static const char* __s_getDataType_() { return "sensor_msgs/Range"; } 00068 public: 00069 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); } 00070 00071 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); } 00072 00073 private: 00074 static const char* __s_getMD5Sum_() { return "c005c34273dc426c67a020a87bc24148"; } 00075 public: 00076 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); } 00077 00078 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); } 00079 00080 private: 00081 static const char* __s_getMessageDefinition_() { return "# Single range reading from an active ranger that emits energy and reports\n\ 00082 # one range reading that is valid along an arc at the distance measured. \n\ 00083 # This message is not appropriate for fixed-range obstacle detectors, \n\ 00084 # such as the Sharp GP2D15. This message is also not appropriate for laser \n\ 00085 # scanners. See the LaserScan message if you are working with a laser scanner.\n\ 00086 \n\ 00087 Header header # timestamp in the header is the time the ranger\n\ 00088 # returned the distance reading\n\ 00089 \n\ 00090 # Radiation type enums\n\ 00091 # If you want a value added to this list, send an email to the ros-users list\n\ 00092 uint8 ULTRASOUND=0\n\ 00093 uint8 INFRARED=1\n\ 00094 \n\ 00095 uint8 radiation_type # the type of radiation used by the sensor\n\ 00096 # (sound, IR, etc) [enum]\n\ 00097 \n\ 00098 float32 field_of_view # the size of the arc that the distance reading is\n\ 00099 # valid for [rad]\n\ 00100 # the object causing the range reading may have\n\ 00101 # been anywhere within -field_of_view/2 and\n\ 00102 # field_of_view/2 at the measured range. \n\ 00103 # 0 angle corresponds to the x-axis of the sensor.\n\ 00104 \n\ 00105 float32 min_range # minimum range value [m]\n\ 00106 float32 max_range # maximum range value [m]\n\ 00107 \n\ 00108 float32 range # range data [m]\n\ 00109 # (Note: values < range_min or > range_max\n\ 00110 # should be discarded)\n\ 00111 \n\ 00112 ================================================================================\n\ 00113 MSG: std_msgs/Header\n\ 00114 # Standard metadata for higher-level stamped data types.\n\ 00115 # This is generally used to communicate timestamped data \n\ 00116 # in a particular coordinate frame.\n\ 00117 # \n\ 00118 # sequence ID: consecutively increasing ID \n\ 00119 uint32 seq\n\ 00120 #Two-integer timestamp that is expressed as:\n\ 00121 # * stamp.secs: seconds (stamp_secs) since epoch\n\ 00122 # * stamp.nsecs: nanoseconds since stamp_secs\n\ 00123 # time-handling sugar is provided by the client library\n\ 00124 time stamp\n\ 00125 #Frame this data is associated with\n\ 00126 # 0: no frame\n\ 00127 # 1: global frame\n\ 00128 string frame_id\n\ 00129 \n\ 00130 "; } 00131 public: 00132 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); } 00133 00134 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); } 00135 00136 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const 00137 { 00138 ros::serialization::OStream stream(write_ptr, 1000000000); 00139 ros::serialization::serialize(stream, header); 00140 ros::serialization::serialize(stream, radiation_type); 00141 ros::serialization::serialize(stream, field_of_view); 00142 ros::serialization::serialize(stream, min_range); 00143 ros::serialization::serialize(stream, max_range); 00144 ros::serialization::serialize(stream, range); 00145 return stream.getData(); 00146 } 00147 00148 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr) 00149 { 00150 ros::serialization::IStream stream(read_ptr, 1000000000); 00151 ros::serialization::deserialize(stream, header); 00152 ros::serialization::deserialize(stream, radiation_type); 00153 ros::serialization::deserialize(stream, field_of_view); 00154 ros::serialization::deserialize(stream, min_range); 00155 ros::serialization::deserialize(stream, max_range); 00156 ros::serialization::deserialize(stream, range); 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(header); 00164 size += ros::serialization::serializationLength(radiation_type); 00165 size += ros::serialization::serializationLength(field_of_view); 00166 size += ros::serialization::serializationLength(min_range); 00167 size += ros::serialization::serializationLength(max_range); 00168 size += ros::serialization::serializationLength(range); 00169 return size; 00170 } 00171 00172 typedef boost::shared_ptr< ::sensor_msgs::Range_<ContainerAllocator> > Ptr; 00173 typedef boost::shared_ptr< ::sensor_msgs::Range_<ContainerAllocator> const> ConstPtr; 00174 boost::shared_ptr<std::map<std::string, std::string> > __connection_header; 00175 }; // struct Range 00176 typedef ::sensor_msgs::Range_<std::allocator<void> > Range; 00177 00178 typedef boost::shared_ptr< ::sensor_msgs::Range> RangePtr; 00179 typedef boost::shared_ptr< ::sensor_msgs::Range const> RangeConstPtr; 00180 00181 00182 template<typename ContainerAllocator> 00183 std::ostream& operator<<(std::ostream& s, const ::sensor_msgs::Range_<ContainerAllocator> & v) 00184 { 00185 ros::message_operations::Printer< ::sensor_msgs::Range_<ContainerAllocator> >::stream(s, "", v); 00186 return s;} 00187 00188 } // namespace sensor_msgs 00189 00190 namespace ros 00191 { 00192 namespace message_traits 00193 { 00194 template<class ContainerAllocator> struct IsMessage< ::sensor_msgs::Range_<ContainerAllocator> > : public TrueType {}; 00195 template<class ContainerAllocator> struct IsMessage< ::sensor_msgs::Range_<ContainerAllocator> const> : public TrueType {}; 00196 template<class ContainerAllocator> 00197 struct MD5Sum< ::sensor_msgs::Range_<ContainerAllocator> > { 00198 static const char* value() 00199 { 00200 return "c005c34273dc426c67a020a87bc24148"; 00201 } 00202 00203 static const char* value(const ::sensor_msgs::Range_<ContainerAllocator> &) { return value(); } 00204 static const uint64_t static_value1 = 0xc005c34273dc426cULL; 00205 static const uint64_t static_value2 = 0x67a020a87bc24148ULL; 00206 }; 00207 00208 template<class ContainerAllocator> 00209 struct DataType< ::sensor_msgs::Range_<ContainerAllocator> > { 00210 static const char* value() 00211 { 00212 return "sensor_msgs/Range"; 00213 } 00214 00215 static const char* value(const ::sensor_msgs::Range_<ContainerAllocator> &) { return value(); } 00216 }; 00217 00218 template<class ContainerAllocator> 00219 struct Definition< ::sensor_msgs::Range_<ContainerAllocator> > { 00220 static const char* value() 00221 { 00222 return "# Single range reading from an active ranger that emits energy and reports\n\ 00223 # one range reading that is valid along an arc at the distance measured. \n\ 00224 # This message is not appropriate for fixed-range obstacle detectors, \n\ 00225 # such as the Sharp GP2D15. This message is also not appropriate for laser \n\ 00226 # scanners. See the LaserScan message if you are working with a laser scanner.\n\ 00227 \n\ 00228 Header header # timestamp in the header is the time the ranger\n\ 00229 # returned the distance reading\n\ 00230 \n\ 00231 # Radiation type enums\n\ 00232 # If you want a value added to this list, send an email to the ros-users list\n\ 00233 uint8 ULTRASOUND=0\n\ 00234 uint8 INFRARED=1\n\ 00235 \n\ 00236 uint8 radiation_type # the type of radiation used by the sensor\n\ 00237 # (sound, IR, etc) [enum]\n\ 00238 \n\ 00239 float32 field_of_view # the size of the arc that the distance reading is\n\ 00240 # valid for [rad]\n\ 00241 # the object causing the range reading may have\n\ 00242 # been anywhere within -field_of_view/2 and\n\ 00243 # field_of_view/2 at the measured range. \n\ 00244 # 0 angle corresponds to the x-axis of the sensor.\n\ 00245 \n\ 00246 float32 min_range # minimum range value [m]\n\ 00247 float32 max_range # maximum range value [m]\n\ 00248 \n\ 00249 float32 range # range data [m]\n\ 00250 # (Note: values < range_min or > range_max\n\ 00251 # should be discarded)\n\ 00252 \n\ 00253 ================================================================================\n\ 00254 MSG: std_msgs/Header\n\ 00255 # Standard metadata for higher-level stamped data types.\n\ 00256 # This is generally used to communicate timestamped data \n\ 00257 # in a particular coordinate frame.\n\ 00258 # \n\ 00259 # sequence ID: consecutively increasing ID \n\ 00260 uint32 seq\n\ 00261 #Two-integer timestamp that is expressed as:\n\ 00262 # * stamp.secs: seconds (stamp_secs) since epoch\n\ 00263 # * stamp.nsecs: nanoseconds since stamp_secs\n\ 00264 # time-handling sugar is provided by the client library\n\ 00265 time stamp\n\ 00266 #Frame this data is associated with\n\ 00267 # 0: no frame\n\ 00268 # 1: global frame\n\ 00269 string frame_id\n\ 00270 \n\ 00271 "; 00272 } 00273 00274 static const char* value(const ::sensor_msgs::Range_<ContainerAllocator> &) { return value(); } 00275 }; 00276 00277 template<class ContainerAllocator> struct HasHeader< ::sensor_msgs::Range_<ContainerAllocator> > : public TrueType {}; 00278 template<class ContainerAllocator> struct HasHeader< const ::sensor_msgs::Range_<ContainerAllocator> > : public TrueType {}; 00279 } // namespace message_traits 00280 } // namespace ros 00281 00282 namespace ros 00283 { 00284 namespace serialization 00285 { 00286 00287 template<class ContainerAllocator> struct Serializer< ::sensor_msgs::Range_<ContainerAllocator> > 00288 { 00289 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) 00290 { 00291 stream.next(m.header); 00292 stream.next(m.radiation_type); 00293 stream.next(m.field_of_view); 00294 stream.next(m.min_range); 00295 stream.next(m.max_range); 00296 stream.next(m.range); 00297 } 00298 00299 ROS_DECLARE_ALLINONE_SERIALIZER; 00300 }; // struct Range_ 00301 } // namespace serialization 00302 } // namespace ros 00303 00304 namespace ros 00305 { 00306 namespace message_operations 00307 { 00308 00309 template<class ContainerAllocator> 00310 struct Printer< ::sensor_msgs::Range_<ContainerAllocator> > 00311 { 00312 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::sensor_msgs::Range_<ContainerAllocator> & v) 00313 { 00314 s << indent << "header: "; 00315 s << std::endl; 00316 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header); 00317 s << indent << "radiation_type: "; 00318 Printer<uint8_t>::stream(s, indent + " ", v.radiation_type); 00319 s << indent << "field_of_view: "; 00320 Printer<float>::stream(s, indent + " ", v.field_of_view); 00321 s << indent << "min_range: "; 00322 Printer<float>::stream(s, indent + " ", v.min_range); 00323 s << indent << "max_range: "; 00324 Printer<float>::stream(s, indent + " ", v.max_range); 00325 s << indent << "range: "; 00326 Printer<float>::stream(s, indent + " ", v.range); 00327 } 00328 }; 00329 00330 00331 } // namespace message_operations 00332 } // namespace ros 00333 00334 #endif // SENSOR_MSGS_MESSAGE_RANGE_H 00335