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