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