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