00001
00002 #ifndef COSTMAP_2D_MESSAGE_VOXELGRID_H
00003 #define COSTMAP_2D_MESSAGE_VOXELGRID_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 "geometry_msgs/Point32.h"
00015 #include "geometry_msgs/Vector3.h"
00016
00017 namespace costmap_2d
00018 {
00019 template <class ContainerAllocator>
00020 struct VoxelGrid_ : public ros::Message
00021 {
00022 typedef VoxelGrid_<ContainerAllocator> Type;
00023
00024 VoxelGrid_()
00025 : header()
00026 , data()
00027 , origin()
00028 , resolutions()
00029 , size_x(0)
00030 , size_y(0)
00031 , size_z(0)
00032 {
00033 }
00034
00035 VoxelGrid_(const ContainerAllocator& _alloc)
00036 : header(_alloc)
00037 , data(_alloc)
00038 , origin(_alloc)
00039 , resolutions(_alloc)
00040 , size_x(0)
00041 , size_y(0)
00042 , size_z(0)
00043 {
00044 }
00045
00046 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00047 ::std_msgs::Header_<ContainerAllocator> header;
00048
00049 typedef std::vector<uint32_t, typename ContainerAllocator::template rebind<uint32_t>::other > _data_type;
00050 std::vector<uint32_t, typename ContainerAllocator::template rebind<uint32_t>::other > data;
00051
00052 typedef ::geometry_msgs::Point32_<ContainerAllocator> _origin_type;
00053 ::geometry_msgs::Point32_<ContainerAllocator> origin;
00054
00055 typedef ::geometry_msgs::Vector3_<ContainerAllocator> _resolutions_type;
00056 ::geometry_msgs::Vector3_<ContainerAllocator> resolutions;
00057
00058 typedef uint32_t _size_x_type;
00059 uint32_t size_x;
00060
00061 typedef uint32_t _size_y_type;
00062 uint32_t size_y;
00063
00064 typedef uint32_t _size_z_type;
00065 uint32_t size_z;
00066
00067
00068 ROS_DEPRECATED uint32_t get_data_size() const { return (uint32_t)data.size(); }
00069 ROS_DEPRECATED void set_data_size(uint32_t size) { data.resize((size_t)size); }
00070 ROS_DEPRECATED void get_data_vec(std::vector<uint32_t, typename ContainerAllocator::template rebind<uint32_t>::other > & vec) const { vec = this->data; }
00071 ROS_DEPRECATED void set_data_vec(const std::vector<uint32_t, typename ContainerAllocator::template rebind<uint32_t>::other > & vec) { this->data = vec; }
00072 private:
00073 static const char* __s_getDataType_() { return "costmap_2d/VoxelGrid"; }
00074 public:
00075 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00076
00077 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00078
00079 private:
00080 static const char* __s_getMD5Sum_() { return "48a040827e1322073d78ece5a497029c"; }
00081 public:
00082 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00083
00084 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00085
00086 private:
00087 static const char* __s_getMessageDefinition_() { return "Header header\n\
00088 uint32[] data\n\
00089 geometry_msgs/Point32 origin\n\
00090 geometry_msgs/Vector3 resolutions\n\
00091 uint32 size_x\n\
00092 uint32 size_y\n\
00093 uint32 size_z\n\
00094 \n\
00095 \n\
00096 ================================================================================\n\
00097 MSG: std_msgs/Header\n\
00098 # Standard metadata for higher-level stamped data types.\n\
00099 # This is generally used to communicate timestamped data \n\
00100 # in a particular coordinate frame.\n\
00101 # \n\
00102 # sequence ID: consecutively increasing ID \n\
00103 uint32 seq\n\
00104 #Two-integer timestamp that is expressed as:\n\
00105 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00106 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00107 # time-handling sugar is provided by the client library\n\
00108 time stamp\n\
00109 #Frame this data is associated with\n\
00110 # 0: no frame\n\
00111 # 1: global frame\n\
00112 string frame_id\n\
00113 \n\
00114 ================================================================================\n\
00115 MSG: geometry_msgs/Point32\n\
00116 # This contains the position of a point in free space(with 32 bits of precision).\n\
00117 # It is recommeded to use Point wherever possible instead of Point32. \n\
00118 # \n\
00119 # This recommendation is to promote interoperability. \n\
00120 #\n\
00121 # This message is designed to take up less space when sending\n\
00122 # lots of points at once, as in the case of a PointCloud. \n\
00123 \n\
00124 float32 x\n\
00125 float32 y\n\
00126 float32 z\n\
00127 ================================================================================\n\
00128 MSG: geometry_msgs/Vector3\n\
00129 # This represents a vector in free space. \n\
00130 \n\
00131 float64 x\n\
00132 float64 y\n\
00133 float64 z\n\
00134 "; }
00135 public:
00136 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00137
00138 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00139
00140 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00141 {
00142 ros::serialization::OStream stream(write_ptr, 1000000000);
00143 ros::serialization::serialize(stream, header);
00144 ros::serialization::serialize(stream, data);
00145 ros::serialization::serialize(stream, origin);
00146 ros::serialization::serialize(stream, resolutions);
00147 ros::serialization::serialize(stream, size_x);
00148 ros::serialization::serialize(stream, size_y);
00149 ros::serialization::serialize(stream, size_z);
00150 return stream.getData();
00151 }
00152
00153 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00154 {
00155 ros::serialization::IStream stream(read_ptr, 1000000000);
00156 ros::serialization::deserialize(stream, header);
00157 ros::serialization::deserialize(stream, data);
00158 ros::serialization::deserialize(stream, origin);
00159 ros::serialization::deserialize(stream, resolutions);
00160 ros::serialization::deserialize(stream, size_x);
00161 ros::serialization::deserialize(stream, size_y);
00162 ros::serialization::deserialize(stream, size_z);
00163 return stream.getData();
00164 }
00165
00166 ROS_DEPRECATED virtual uint32_t serializationLength() const
00167 {
00168 uint32_t size = 0;
00169 size += ros::serialization::serializationLength(header);
00170 size += ros::serialization::serializationLength(data);
00171 size += ros::serialization::serializationLength(origin);
00172 size += ros::serialization::serializationLength(resolutions);
00173 size += ros::serialization::serializationLength(size_x);
00174 size += ros::serialization::serializationLength(size_y);
00175 size += ros::serialization::serializationLength(size_z);
00176 return size;
00177 }
00178
00179 typedef boost::shared_ptr< ::costmap_2d::VoxelGrid_<ContainerAllocator> > Ptr;
00180 typedef boost::shared_ptr< ::costmap_2d::VoxelGrid_<ContainerAllocator> const> ConstPtr;
00181 };
00182 typedef ::costmap_2d::VoxelGrid_<std::allocator<void> > VoxelGrid;
00183
00184 typedef boost::shared_ptr< ::costmap_2d::VoxelGrid> VoxelGridPtr;
00185 typedef boost::shared_ptr< ::costmap_2d::VoxelGrid const> VoxelGridConstPtr;
00186
00187
00188 template<typename ContainerAllocator>
00189 std::ostream& operator<<(std::ostream& s, const ::costmap_2d::VoxelGrid_<ContainerAllocator> & v)
00190 {
00191 ros::message_operations::Printer< ::costmap_2d::VoxelGrid_<ContainerAllocator> >::stream(s, "", v);
00192 return s;}
00193
00194 }
00195
00196 namespace ros
00197 {
00198 namespace message_traits
00199 {
00200 template<class ContainerAllocator>
00201 struct MD5Sum< ::costmap_2d::VoxelGrid_<ContainerAllocator> > {
00202 static const char* value()
00203 {
00204 return "48a040827e1322073d78ece5a497029c";
00205 }
00206
00207 static const char* value(const ::costmap_2d::VoxelGrid_<ContainerAllocator> &) { return value(); }
00208 static const uint64_t static_value1 = 0x48a040827e132207ULL;
00209 static const uint64_t static_value2 = 0x3d78ece5a497029cULL;
00210 };
00211
00212 template<class ContainerAllocator>
00213 struct DataType< ::costmap_2d::VoxelGrid_<ContainerAllocator> > {
00214 static const char* value()
00215 {
00216 return "costmap_2d/VoxelGrid";
00217 }
00218
00219 static const char* value(const ::costmap_2d::VoxelGrid_<ContainerAllocator> &) { return value(); }
00220 };
00221
00222 template<class ContainerAllocator>
00223 struct Definition< ::costmap_2d::VoxelGrid_<ContainerAllocator> > {
00224 static const char* value()
00225 {
00226 return "Header header\n\
00227 uint32[] data\n\
00228 geometry_msgs/Point32 origin\n\
00229 geometry_msgs/Vector3 resolutions\n\
00230 uint32 size_x\n\
00231 uint32 size_y\n\
00232 uint32 size_z\n\
00233 \n\
00234 \n\
00235 ================================================================================\n\
00236 MSG: std_msgs/Header\n\
00237 # Standard metadata for higher-level stamped data types.\n\
00238 # This is generally used to communicate timestamped data \n\
00239 # in a particular coordinate frame.\n\
00240 # \n\
00241 # sequence ID: consecutively increasing ID \n\
00242 uint32 seq\n\
00243 #Two-integer timestamp that is expressed as:\n\
00244 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00245 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00246 # time-handling sugar is provided by the client library\n\
00247 time stamp\n\
00248 #Frame this data is associated with\n\
00249 # 0: no frame\n\
00250 # 1: global frame\n\
00251 string frame_id\n\
00252 \n\
00253 ================================================================================\n\
00254 MSG: geometry_msgs/Point32\n\
00255 # This contains the position of a point in free space(with 32 bits of precision).\n\
00256 # It is recommeded to use Point wherever possible instead of Point32. \n\
00257 # \n\
00258 # This recommendation is to promote interoperability. \n\
00259 #\n\
00260 # This message is designed to take up less space when sending\n\
00261 # lots of points at once, as in the case of a PointCloud. \n\
00262 \n\
00263 float32 x\n\
00264 float32 y\n\
00265 float32 z\n\
00266 ================================================================================\n\
00267 MSG: geometry_msgs/Vector3\n\
00268 # This represents a vector in free space. \n\
00269 \n\
00270 float64 x\n\
00271 float64 y\n\
00272 float64 z\n\
00273 ";
00274 }
00275
00276 static const char* value(const ::costmap_2d::VoxelGrid_<ContainerAllocator> &) { return value(); }
00277 };
00278
00279 template<class ContainerAllocator> struct HasHeader< ::costmap_2d::VoxelGrid_<ContainerAllocator> > : public TrueType {};
00280 template<class ContainerAllocator> struct HasHeader< const ::costmap_2d::VoxelGrid_<ContainerAllocator> > : public TrueType {};
00281 }
00282 }
00283
00284 namespace ros
00285 {
00286 namespace serialization
00287 {
00288
00289 template<class ContainerAllocator> struct Serializer< ::costmap_2d::VoxelGrid_<ContainerAllocator> >
00290 {
00291 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00292 {
00293 stream.next(m.header);
00294 stream.next(m.data);
00295 stream.next(m.origin);
00296 stream.next(m.resolutions);
00297 stream.next(m.size_x);
00298 stream.next(m.size_y);
00299 stream.next(m.size_z);
00300 }
00301
00302 ROS_DECLARE_ALLINONE_SERIALIZER;
00303 };
00304 }
00305 }
00306
00307 namespace ros
00308 {
00309 namespace message_operations
00310 {
00311
00312 template<class ContainerAllocator>
00313 struct Printer< ::costmap_2d::VoxelGrid_<ContainerAllocator> >
00314 {
00315 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::costmap_2d::VoxelGrid_<ContainerAllocator> & v)
00316 {
00317 s << indent << "header: ";
00318 s << std::endl;
00319 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00320 s << indent << "data[]" << std::endl;
00321 for (size_t i = 0; i < v.data.size(); ++i)
00322 {
00323 s << indent << " data[" << i << "]: ";
00324 Printer<uint32_t>::stream(s, indent + " ", v.data[i]);
00325 }
00326 s << indent << "origin: ";
00327 s << std::endl;
00328 Printer< ::geometry_msgs::Point32_<ContainerAllocator> >::stream(s, indent + " ", v.origin);
00329 s << indent << "resolutions: ";
00330 s << std::endl;
00331 Printer< ::geometry_msgs::Vector3_<ContainerAllocator> >::stream(s, indent + " ", v.resolutions);
00332 s << indent << "size_x: ";
00333 Printer<uint32_t>::stream(s, indent + " ", v.size_x);
00334 s << indent << "size_y: ";
00335 Printer<uint32_t>::stream(s, indent + " ", v.size_y);
00336 s << indent << "size_z: ";
00337 Printer<uint32_t>::stream(s, indent + " ", v.size_z);
00338 }
00339 };
00340
00341
00342 }
00343 }
00344
00345 #endif // COSTMAP_2D_MESSAGE_VOXELGRID_H
00346