00001
00002 #ifndef SENSOR_MSGS_MESSAGE_POINTCLOUD_H
00003 #define SENSOR_MSGS_MESSAGE_POINTCLOUD_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 "sensor_msgs/ChannelFloat32.h"
00016
00017 namespace sensor_msgs
00018 {
00019 template <class ContainerAllocator>
00020 struct PointCloud_ : public ros::Message
00021 {
00022 typedef PointCloud_<ContainerAllocator> Type;
00023
00024 PointCloud_()
00025 : header()
00026 , points()
00027 , channels()
00028 {
00029 }
00030
00031 PointCloud_(const ContainerAllocator& _alloc)
00032 : header(_alloc)
00033 , points(_alloc)
00034 , channels(_alloc)
00035 {
00036 }
00037
00038 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00039 ::std_msgs::Header_<ContainerAllocator> header;
00040
00041 typedef std::vector< ::geometry_msgs::Point32_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Point32_<ContainerAllocator> >::other > _points_type;
00042 std::vector< ::geometry_msgs::Point32_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Point32_<ContainerAllocator> >::other > points;
00043
00044 typedef std::vector< ::sensor_msgs::ChannelFloat32_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::sensor_msgs::ChannelFloat32_<ContainerAllocator> >::other > _channels_type;
00045 std::vector< ::sensor_msgs::ChannelFloat32_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::sensor_msgs::ChannelFloat32_<ContainerAllocator> >::other > channels;
00046
00047
00048 ROS_DEPRECATED uint32_t get_points_size() const { return (uint32_t)points.size(); }
00049 ROS_DEPRECATED void set_points_size(uint32_t size) { points.resize((size_t)size); }
00050 ROS_DEPRECATED void get_points_vec(std::vector< ::geometry_msgs::Point32_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Point32_<ContainerAllocator> >::other > & vec) const { vec = this->points; }
00051 ROS_DEPRECATED void set_points_vec(const std::vector< ::geometry_msgs::Point32_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::geometry_msgs::Point32_<ContainerAllocator> >::other > & vec) { this->points = vec; }
00052 ROS_DEPRECATED uint32_t get_channels_size() const { return (uint32_t)channels.size(); }
00053 ROS_DEPRECATED void set_channels_size(uint32_t size) { channels.resize((size_t)size); }
00054 ROS_DEPRECATED void get_channels_vec(std::vector< ::sensor_msgs::ChannelFloat32_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::sensor_msgs::ChannelFloat32_<ContainerAllocator> >::other > & vec) const { vec = this->channels; }
00055 ROS_DEPRECATED void set_channels_vec(const std::vector< ::sensor_msgs::ChannelFloat32_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::sensor_msgs::ChannelFloat32_<ContainerAllocator> >::other > & vec) { this->channels = vec; }
00056 private:
00057 static const char* __s_getDataType_() { return "sensor_msgs/PointCloud"; }
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 "d8e9c3f5afbdd8a130fd1d2763945fca"; }
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 "# This message holds a collection of 3d points, plus optional additional\n\
00072 # information about each point.\n\
00073 \n\
00074 # Time of sensor data acquisition, coordinate frame ID.\n\
00075 Header header\n\
00076 \n\
00077 # Array of 3d points. Each Point32 should be interpreted as a 3d point\n\
00078 # in the frame given in the header.\n\
00079 geometry_msgs/Point32[] points\n\
00080 \n\
00081 # Each channel should have the same number of elements as points array,\n\
00082 # and the data in each channel should correspond 1:1 with each point.\n\
00083 # Channel names in common practice are listed in ChannelFloat32.msg.\n\
00084 ChannelFloat32[] channels\n\
00085 \n\
00086 ================================================================================\n\
00087 MSG: std_msgs/Header\n\
00088 # Standard metadata for higher-level stamped data types.\n\
00089 # This is generally used to communicate timestamped data \n\
00090 # in a particular coordinate frame.\n\
00091 # \n\
00092 # sequence ID: consecutively increasing ID \n\
00093 uint32 seq\n\
00094 #Two-integer timestamp that is expressed as:\n\
00095 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00096 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00097 # time-handling sugar is provided by the client library\n\
00098 time stamp\n\
00099 #Frame this data is associated with\n\
00100 # 0: no frame\n\
00101 # 1: global frame\n\
00102 string frame_id\n\
00103 \n\
00104 ================================================================================\n\
00105 MSG: geometry_msgs/Point32\n\
00106 # This contains the position of a point in free space(with 32 bits of precision).\n\
00107 # It is recommeded to use Point wherever possible instead of Point32. \n\
00108 # \n\
00109 # This recommendation is to promote interoperability. \n\
00110 #\n\
00111 # This message is designed to take up less space when sending\n\
00112 # lots of points at once, as in the case of a PointCloud. \n\
00113 \n\
00114 float32 x\n\
00115 float32 y\n\
00116 float32 z\n\
00117 ================================================================================\n\
00118 MSG: sensor_msgs/ChannelFloat32\n\
00119 # This message is used by the PointCloud message to hold optional data\n\
00120 # associated with each point in the cloud. The length of the values\n\
00121 # array should be the same as the length of the points array in the\n\
00122 # PointCloud, and each value should be associated with the corresponding\n\
00123 # point.\n\
00124 \n\
00125 # Channel names in existing practice include:\n\
00126 # \"u\", \"v\" - row and column (respectively) in the left stereo image.\n\
00127 # This is opposite to usual conventions but remains for\n\
00128 # historical reasons. The newer PointCloud2 message has no\n\
00129 # such problem.\n\
00130 # \"rgb\" - For point clouds produced by color stereo cameras. uint8\n\
00131 # (R,G,B) values packed into the least significant 24 bits,\n\
00132 # in order.\n\
00133 # \"intensity\" - laser or pixel intensity.\n\
00134 # \"distance\"\n\
00135 \n\
00136 # The channel name should give semantics of the channel (e.g.\n\
00137 # \"intensity\" instead of \"value\").\n\
00138 string name\n\
00139 \n\
00140 # The values array should be 1-1 with the elements of the associated\n\
00141 # PointCloud.\n\
00142 float32[] values\n\
00143 \n\
00144 "; }
00145 public:
00146 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00147
00148 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00149
00150 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00151 {
00152 ros::serialization::OStream stream(write_ptr, 1000000000);
00153 ros::serialization::serialize(stream, header);
00154 ros::serialization::serialize(stream, points);
00155 ros::serialization::serialize(stream, channels);
00156 return stream.getData();
00157 }
00158
00159 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00160 {
00161 ros::serialization::IStream stream(read_ptr, 1000000000);
00162 ros::serialization::deserialize(stream, header);
00163 ros::serialization::deserialize(stream, points);
00164 ros::serialization::deserialize(stream, channels);
00165 return stream.getData();
00166 }
00167
00168 ROS_DEPRECATED virtual uint32_t serializationLength() const
00169 {
00170 uint32_t size = 0;
00171 size += ros::serialization::serializationLength(header);
00172 size += ros::serialization::serializationLength(points);
00173 size += ros::serialization::serializationLength(channels);
00174 return size;
00175 }
00176
00177 typedef boost::shared_ptr< ::sensor_msgs::PointCloud_<ContainerAllocator> > Ptr;
00178 typedef boost::shared_ptr< ::sensor_msgs::PointCloud_<ContainerAllocator> const> ConstPtr;
00179 };
00180 typedef ::sensor_msgs::PointCloud_<std::allocator<void> > PointCloud;
00181
00182 typedef boost::shared_ptr< ::sensor_msgs::PointCloud> PointCloudPtr;
00183 typedef boost::shared_ptr< ::sensor_msgs::PointCloud const> PointCloudConstPtr;
00184
00185
00186 template<typename ContainerAllocator>
00187 std::ostream& operator<<(std::ostream& s, const ::sensor_msgs::PointCloud_<ContainerAllocator> & v)
00188 {
00189 ros::message_operations::Printer< ::sensor_msgs::PointCloud_<ContainerAllocator> >::stream(s, "", v);
00190 return s;}
00191
00192 }
00193
00194 namespace ros
00195 {
00196 namespace message_traits
00197 {
00198 template<class ContainerAllocator>
00199 struct MD5Sum< ::sensor_msgs::PointCloud_<ContainerAllocator> > {
00200 static const char* value()
00201 {
00202 return "d8e9c3f5afbdd8a130fd1d2763945fca";
00203 }
00204
00205 static const char* value(const ::sensor_msgs::PointCloud_<ContainerAllocator> &) { return value(); }
00206 static const uint64_t static_value1 = 0xd8e9c3f5afbdd8a1ULL;
00207 static const uint64_t static_value2 = 0x30fd1d2763945fcaULL;
00208 };
00209
00210 template<class ContainerAllocator>
00211 struct DataType< ::sensor_msgs::PointCloud_<ContainerAllocator> > {
00212 static const char* value()
00213 {
00214 return "sensor_msgs/PointCloud";
00215 }
00216
00217 static const char* value(const ::sensor_msgs::PointCloud_<ContainerAllocator> &) { return value(); }
00218 };
00219
00220 template<class ContainerAllocator>
00221 struct Definition< ::sensor_msgs::PointCloud_<ContainerAllocator> > {
00222 static const char* value()
00223 {
00224 return "# This message holds a collection of 3d points, plus optional additional\n\
00225 # information about each point.\n\
00226 \n\
00227 # Time of sensor data acquisition, coordinate frame ID.\n\
00228 Header header\n\
00229 \n\
00230 # Array of 3d points. Each Point32 should be interpreted as a 3d point\n\
00231 # in the frame given in the header.\n\
00232 geometry_msgs/Point32[] points\n\
00233 \n\
00234 # Each channel should have the same number of elements as points array,\n\
00235 # and the data in each channel should correspond 1:1 with each point.\n\
00236 # Channel names in common practice are listed in ChannelFloat32.msg.\n\
00237 ChannelFloat32[] channels\n\
00238 \n\
00239 ================================================================================\n\
00240 MSG: std_msgs/Header\n\
00241 # Standard metadata for higher-level stamped data types.\n\
00242 # This is generally used to communicate timestamped data \n\
00243 # in a particular coordinate frame.\n\
00244 # \n\
00245 # sequence ID: consecutively increasing ID \n\
00246 uint32 seq\n\
00247 #Two-integer timestamp that is expressed as:\n\
00248 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00249 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00250 # time-handling sugar is provided by the client library\n\
00251 time stamp\n\
00252 #Frame this data is associated with\n\
00253 # 0: no frame\n\
00254 # 1: global frame\n\
00255 string frame_id\n\
00256 \n\
00257 ================================================================================\n\
00258 MSG: geometry_msgs/Point32\n\
00259 # This contains the position of a point in free space(with 32 bits of precision).\n\
00260 # It is recommeded to use Point wherever possible instead of Point32. \n\
00261 # \n\
00262 # This recommendation is to promote interoperability. \n\
00263 #\n\
00264 # This message is designed to take up less space when sending\n\
00265 # lots of points at once, as in the case of a PointCloud. \n\
00266 \n\
00267 float32 x\n\
00268 float32 y\n\
00269 float32 z\n\
00270 ================================================================================\n\
00271 MSG: sensor_msgs/ChannelFloat32\n\
00272 # This message is used by the PointCloud message to hold optional data\n\
00273 # associated with each point in the cloud. The length of the values\n\
00274 # array should be the same as the length of the points array in the\n\
00275 # PointCloud, and each value should be associated with the corresponding\n\
00276 # point.\n\
00277 \n\
00278 # Channel names in existing practice include:\n\
00279 # \"u\", \"v\" - row and column (respectively) in the left stereo image.\n\
00280 # This is opposite to usual conventions but remains for\n\
00281 # historical reasons. The newer PointCloud2 message has no\n\
00282 # such problem.\n\
00283 # \"rgb\" - For point clouds produced by color stereo cameras. uint8\n\
00284 # (R,G,B) values packed into the least significant 24 bits,\n\
00285 # in order.\n\
00286 # \"intensity\" - laser or pixel intensity.\n\
00287 # \"distance\"\n\
00288 \n\
00289 # The channel name should give semantics of the channel (e.g.\n\
00290 # \"intensity\" instead of \"value\").\n\
00291 string name\n\
00292 \n\
00293 # The values array should be 1-1 with the elements of the associated\n\
00294 # PointCloud.\n\
00295 float32[] values\n\
00296 \n\
00297 ";
00298 }
00299
00300 static const char* value(const ::sensor_msgs::PointCloud_<ContainerAllocator> &) { return value(); }
00301 };
00302
00303 template<class ContainerAllocator> struct HasHeader< ::sensor_msgs::PointCloud_<ContainerAllocator> > : public TrueType {};
00304 template<class ContainerAllocator> struct HasHeader< const ::sensor_msgs::PointCloud_<ContainerAllocator> > : public TrueType {};
00305 }
00306 }
00307
00308 namespace ros
00309 {
00310 namespace serialization
00311 {
00312
00313 template<class ContainerAllocator> struct Serializer< ::sensor_msgs::PointCloud_<ContainerAllocator> >
00314 {
00315 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00316 {
00317 stream.next(m.header);
00318 stream.next(m.points);
00319 stream.next(m.channels);
00320 }
00321
00322 ROS_DECLARE_ALLINONE_SERIALIZER;
00323 };
00324 }
00325 }
00326
00327 namespace ros
00328 {
00329 namespace message_operations
00330 {
00331
00332 template<class ContainerAllocator>
00333 struct Printer< ::sensor_msgs::PointCloud_<ContainerAllocator> >
00334 {
00335 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::sensor_msgs::PointCloud_<ContainerAllocator> & v)
00336 {
00337 s << indent << "header: ";
00338 s << std::endl;
00339 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00340 s << indent << "points[]" << std::endl;
00341 for (size_t i = 0; i < v.points.size(); ++i)
00342 {
00343 s << indent << " points[" << i << "]: ";
00344 s << std::endl;
00345 s << indent;
00346 Printer< ::geometry_msgs::Point32_<ContainerAllocator> >::stream(s, indent + " ", v.points[i]);
00347 }
00348 s << indent << "channels[]" << std::endl;
00349 for (size_t i = 0; i < v.channels.size(); ++i)
00350 {
00351 s << indent << " channels[" << i << "]: ";
00352 s << std::endl;
00353 s << indent;
00354 Printer< ::sensor_msgs::ChannelFloat32_<ContainerAllocator> >::stream(s, indent + " ", v.channels[i]);
00355 }
00356 }
00357 };
00358
00359
00360 }
00361 }
00362
00363 #endif // SENSOR_MSGS_MESSAGE_POINTCLOUD_H
00364