00001
00002 #ifndef NAV_MSGS_MESSAGE_GRIDCELLS_H
00003 #define NAV_MSGS_MESSAGE_GRIDCELLS_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/Point.h"
00015
00016 namespace nav_msgs
00017 {
00018 template <class ContainerAllocator>
00019 struct GridCells_ : public ros::Message
00020 {
00021 typedef GridCells_<ContainerAllocator> Type;
00022
00023 GridCells_()
00024 : header()
00025 , cell_width(0.0)
00026 , cell_height(0.0)
00027 , cells()
00028 {
00029 }
00030
00031 GridCells_(const ContainerAllocator& _alloc)
00032 : header(_alloc)
00033 , cell_width(0.0)
00034 , cell_height(0.0)
00035 , cells(_alloc)
00036 {
00037 }
00038
00039 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00040 ::std_msgs::Header_<ContainerAllocator> header;
00041
00042 typedef float _cell_width_type;
00043 float cell_width;
00044
00045 typedef float _cell_height_type;
00046 float cell_height;
00047
00048 typedef std::vector< ::geometry_msgs::Point_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Point_<ContainerAllocator> >::other > _cells_type;
00049 std::vector< ::geometry_msgs::Point_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Point_<ContainerAllocator> >::other > cells;
00050
00051
00052 ROS_DEPRECATED uint32_t get_cells_size() const { return (uint32_t)cells.size(); }
00053 ROS_DEPRECATED void set_cells_size(uint32_t size) { cells.resize((size_t)size); }
00054 ROS_DEPRECATED void get_cells_vec(std::vector< ::geometry_msgs::Point_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Point_<ContainerAllocator> >::other > & vec) const { vec = this->cells; }
00055 ROS_DEPRECATED void set_cells_vec(const std::vector< ::geometry_msgs::Point_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Point_<ContainerAllocator> >::other > & vec) { this->cells = vec; }
00056 private:
00057 static const char* __s_getDataType_() { return "nav_msgs/GridCells"; }
00058 public:
00059 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00060
00061 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00062
00063 private:
00064 static const char* __s_getMD5Sum_() { return "b9e4f5df6d28e272ebde00a3994830f5"; }
00065 public:
00066 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00067
00068 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00069
00070 private:
00071 static const char* __s_getMessageDefinition_() { return "#an array of cells in a 2D grid\n\
00072 Header header\n\
00073 float32 cell_width\n\
00074 float32 cell_height\n\
00075 geometry_msgs/Point[] cells\n\
00076 \n\
00077 ================================================================================\n\
00078 MSG: std_msgs/Header\n\
00079 # Standard metadata for higher-level stamped data types.\n\
00080 # This is generally used to communicate timestamped data \n\
00081 # in a particular coordinate frame.\n\
00082 # \n\
00083 # sequence ID: consecutively increasing ID \n\
00084 uint32 seq\n\
00085 #Two-integer timestamp that is expressed as:\n\
00086 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00087 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00088 # time-handling sugar is provided by the client library\n\
00089 time stamp\n\
00090 #Frame this data is associated with\n\
00091 # 0: no frame\n\
00092 # 1: global frame\n\
00093 string frame_id\n\
00094 \n\
00095 ================================================================================\n\
00096 MSG: geometry_msgs/Point\n\
00097 # This contains the position of a point in free space\n\
00098 float64 x\n\
00099 float64 y\n\
00100 float64 z\n\
00101 \n\
00102 "; }
00103 public:
00104 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00105
00106 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00107
00108 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00109 {
00110 ros::serialization::OStream stream(write_ptr, 1000000000);
00111 ros::serialization::serialize(stream, header);
00112 ros::serialization::serialize(stream, cell_width);
00113 ros::serialization::serialize(stream, cell_height);
00114 ros::serialization::serialize(stream, cells);
00115 return stream.getData();
00116 }
00117
00118 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00119 {
00120 ros::serialization::IStream stream(read_ptr, 1000000000);
00121 ros::serialization::deserialize(stream, header);
00122 ros::serialization::deserialize(stream, cell_width);
00123 ros::serialization::deserialize(stream, cell_height);
00124 ros::serialization::deserialize(stream, cells);
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(header);
00132 size += ros::serialization::serializationLength(cell_width);
00133 size += ros::serialization::serializationLength(cell_height);
00134 size += ros::serialization::serializationLength(cells);
00135 return size;
00136 }
00137
00138 typedef boost::shared_ptr< ::nav_msgs::GridCells_<ContainerAllocator> > Ptr;
00139 typedef boost::shared_ptr< ::nav_msgs::GridCells_<ContainerAllocator> const> ConstPtr;
00140 };
00141 typedef ::nav_msgs::GridCells_<std::allocator<void> > GridCells;
00142
00143 typedef boost::shared_ptr< ::nav_msgs::GridCells> GridCellsPtr;
00144 typedef boost::shared_ptr< ::nav_msgs::GridCells const> GridCellsConstPtr;
00145
00146
00147 template<typename ContainerAllocator>
00148 std::ostream& operator<<(std::ostream& s, const ::nav_msgs::GridCells_<ContainerAllocator> & v)
00149 {
00150 ros::message_operations::Printer< ::nav_msgs::GridCells_<ContainerAllocator> >::stream(s, "", v);
00151 return s;}
00152
00153 }
00154
00155 namespace ros
00156 {
00157 namespace message_traits
00158 {
00159 template<class ContainerAllocator>
00160 struct MD5Sum< ::nav_msgs::GridCells_<ContainerAllocator> > {
00161 static const char* value()
00162 {
00163 return "b9e4f5df6d28e272ebde00a3994830f5";
00164 }
00165
00166 static const char* value(const ::nav_msgs::GridCells_<ContainerAllocator> &) { return value(); }
00167 static const uint64_t static_value1 = 0xb9e4f5df6d28e272ULL;
00168 static const uint64_t static_value2 = 0xebde00a3994830f5ULL;
00169 };
00170
00171 template<class ContainerAllocator>
00172 struct DataType< ::nav_msgs::GridCells_<ContainerAllocator> > {
00173 static const char* value()
00174 {
00175 return "nav_msgs/GridCells";
00176 }
00177
00178 static const char* value(const ::nav_msgs::GridCells_<ContainerAllocator> &) { return value(); }
00179 };
00180
00181 template<class ContainerAllocator>
00182 struct Definition< ::nav_msgs::GridCells_<ContainerAllocator> > {
00183 static const char* value()
00184 {
00185 return "#an array of cells in a 2D grid\n\
00186 Header header\n\
00187 float32 cell_width\n\
00188 float32 cell_height\n\
00189 geometry_msgs/Point[] cells\n\
00190 \n\
00191 ================================================================================\n\
00192 MSG: std_msgs/Header\n\
00193 # Standard metadata for higher-level stamped data types.\n\
00194 # This is generally used to communicate timestamped data \n\
00195 # in a particular coordinate frame.\n\
00196 # \n\
00197 # sequence ID: consecutively increasing ID \n\
00198 uint32 seq\n\
00199 #Two-integer timestamp that is expressed as:\n\
00200 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00201 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00202 # time-handling sugar is provided by the client library\n\
00203 time stamp\n\
00204 #Frame this data is associated with\n\
00205 # 0: no frame\n\
00206 # 1: global frame\n\
00207 string frame_id\n\
00208 \n\
00209 ================================================================================\n\
00210 MSG: geometry_msgs/Point\n\
00211 # This contains the position of a point in free space\n\
00212 float64 x\n\
00213 float64 y\n\
00214 float64 z\n\
00215 \n\
00216 ";
00217 }
00218
00219 static const char* value(const ::nav_msgs::GridCells_<ContainerAllocator> &) { return value(); }
00220 };
00221
00222 template<class ContainerAllocator> struct HasHeader< ::nav_msgs::GridCells_<ContainerAllocator> > : public TrueType {};
00223 template<class ContainerAllocator> struct HasHeader< const ::nav_msgs::GridCells_<ContainerAllocator> > : public TrueType {};
00224 }
00225 }
00226
00227 namespace ros
00228 {
00229 namespace serialization
00230 {
00231
00232 template<class ContainerAllocator> struct Serializer< ::nav_msgs::GridCells_<ContainerAllocator> >
00233 {
00234 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00235 {
00236 stream.next(m.header);
00237 stream.next(m.cell_width);
00238 stream.next(m.cell_height);
00239 stream.next(m.cells);
00240 }
00241
00242 ROS_DECLARE_ALLINONE_SERIALIZER;
00243 };
00244 }
00245 }
00246
00247 namespace ros
00248 {
00249 namespace message_operations
00250 {
00251
00252 template<class ContainerAllocator>
00253 struct Printer< ::nav_msgs::GridCells_<ContainerAllocator> >
00254 {
00255 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::nav_msgs::GridCells_<ContainerAllocator> & v)
00256 {
00257 s << indent << "header: ";
00258 s << std::endl;
00259 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00260 s << indent << "cell_width: ";
00261 Printer<float>::stream(s, indent + " ", v.cell_width);
00262 s << indent << "cell_height: ";
00263 Printer<float>::stream(s, indent + " ", v.cell_height);
00264 s << indent << "cells[]" << std::endl;
00265 for (size_t i = 0; i < v.cells.size(); ++i)
00266 {
00267 s << indent << " cells[" << i << "]: ";
00268 s << std::endl;
00269 s << indent;
00270 Printer< ::geometry_msgs::Point_<ContainerAllocator> >::stream(s, indent + " ", v.cells[i]);
00271 }
00272 }
00273 };
00274
00275
00276 }
00277 }
00278
00279 #endif // NAV_MSGS_MESSAGE_GRIDCELLS_H
00280