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