00001
00002 #ifndef LASER_SLAM_MESSAGE_LOCALIZEDSCAN_H
00003 #define LASER_SLAM_MESSAGE_LOCALIZEDSCAN_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 "sensor_msgs/LaserScan.h"
00015 #include "sensor_msgs/PointCloud.h"
00016 #include "geometry_msgs/Pose.h"
00017 #include "geometry_msgs/Point.h"
00018
00019 namespace laser_slam
00020 {
00021 template <class ContainerAllocator>
00022 struct LocalizedScan_ : public ros::Message
00023 {
00024 typedef LocalizedScan_<ContainerAllocator> Type;
00025
00026 LocalizedScan_()
00027 : header()
00028 , scan()
00029 , cloud()
00030 , sensor_pose()
00031 , barycenter()
00032 {
00033 }
00034
00035 LocalizedScan_(const ContainerAllocator& _alloc)
00036 : header(_alloc)
00037 , scan(_alloc)
00038 , cloud(_alloc)
00039 , sensor_pose(_alloc)
00040 , barycenter(_alloc)
00041 {
00042 }
00043
00044 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00045 ::std_msgs::Header_<ContainerAllocator> header;
00046
00047 typedef ::sensor_msgs::LaserScan_<ContainerAllocator> _scan_type;
00048 ::sensor_msgs::LaserScan_<ContainerAllocator> scan;
00049
00050 typedef ::sensor_msgs::PointCloud_<ContainerAllocator> _cloud_type;
00051 ::sensor_msgs::PointCloud_<ContainerAllocator> cloud;
00052
00053 typedef ::geometry_msgs::Pose_<ContainerAllocator> _sensor_pose_type;
00054 ::geometry_msgs::Pose_<ContainerAllocator> sensor_pose;
00055
00056 typedef ::geometry_msgs::Point_<ContainerAllocator> _barycenter_type;
00057 ::geometry_msgs::Point_<ContainerAllocator> barycenter;
00058
00059
00060 private:
00061 static const char* __s_getDataType_() { return "laser_slam/LocalizedScan"; }
00062 public:
00063 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00064
00065 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00066
00067 private:
00068 static const char* __s_getMD5Sum_() { return "a4d676ce9bf4274df95bd1940071f796"; }
00069 public:
00070 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00071
00072 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00073
00074 private:
00075 static const char* __s_getMessageDefinition_() { return "# The reference frame and time point w.r.t which sensor pose is stored\n\
00076 # Note that header.stamp might be different from scan.header.stamp\n\
00077 Header header\n\
00078 \n\
00079 # Original scan\n\
00080 sensor_msgs/LaserScan scan\n\
00081 \n\
00082 # Point cloud in sensor frame at timepoint header.stamp, corrected for robot movement\n\
00083 sensor_msgs/PointCloud cloud\n\
00084 \n\
00085 # Pose of sensor in reference frame\n\
00086 geometry_msgs/Pose sensor_pose\n\
00087 \n\
00088 # Barycenter of cloud in ref frame\n\
00089 geometry_msgs/Point barycenter\n\
00090 ================================================================================\n\
00091 MSG: std_msgs/Header\n\
00092 # Standard metadata for higher-level stamped data types.\n\
00093 # This is generally used to communicate timestamped data \n\
00094 # in a particular coordinate frame.\n\
00095 # \n\
00096 # sequence ID: consecutively increasing ID \n\
00097 uint32 seq\n\
00098 #Two-integer timestamp that is expressed as:\n\
00099 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00100 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00101 # time-handling sugar is provided by the client library\n\
00102 time stamp\n\
00103 #Frame this data is associated with\n\
00104 # 0: no frame\n\
00105 # 1: global frame\n\
00106 string frame_id\n\
00107 \n\
00108 ================================================================================\n\
00109 MSG: sensor_msgs/LaserScan\n\
00110 # Single scan from a planar laser range-finder\n\
00111 #\n\
00112 # If you have another ranging device with different behavior (e.g. a sonar\n\
00113 # array), please find or create a different message, since applications\n\
00114 # will make fairly laser-specific assumptions about this data\n\
00115 \n\
00116 Header header # timestamp in the header is the acquisition time of \n\
00117 # the first ray in the scan.\n\
00118 #\n\
00119 # in frame frame_id, angles are measured around \n\
00120 # the positive Z axis (counterclockwise, if Z is up)\n\
00121 # with zero angle being forward along the x axis\n\
00122 \n\
00123 float32 angle_min # start angle of the scan [rad]\n\
00124 float32 angle_max # end angle of the scan [rad]\n\
00125 float32 angle_increment # angular distance between measurements [rad]\n\
00126 \n\
00127 float32 time_increment # time between measurements [seconds] - if your scanner\n\
00128 # is moving, this will be used in interpolating position\n\
00129 # of 3d points\n\
00130 float32 scan_time # time between scans [seconds]\n\
00131 \n\
00132 float32 range_min # minimum range value [m]\n\
00133 float32 range_max # maximum range value [m]\n\
00134 \n\
00135 float32[] ranges # range data [m] (Note: values < range_min or > range_max should be discarded)\n\
00136 float32[] intensities # intensity data [device-specific units]. If your\n\
00137 # device does not provide intensities, please leave\n\
00138 # the array empty.\n\
00139 \n\
00140 ================================================================================\n\
00141 MSG: sensor_msgs/PointCloud\n\
00142 # This message holds a collection of 3d points, plus optional additional\n\
00143 # information about each point.\n\
00144 \n\
00145 # Time of sensor data acquisition, coordinate frame ID.\n\
00146 Header header\n\
00147 \n\
00148 # Array of 3d points. Each Point32 should be interpreted as a 3d point\n\
00149 # in the frame given in the header.\n\
00150 geometry_msgs/Point32[] points\n\
00151 \n\
00152 # Each channel should have the same number of elements as points array,\n\
00153 # and the data in each channel should correspond 1:1 with each point.\n\
00154 # Channel names in common practice are listed in ChannelFloat32.msg.\n\
00155 ChannelFloat32[] channels\n\
00156 \n\
00157 ================================================================================\n\
00158 MSG: geometry_msgs/Point32\n\
00159 # This contains the position of a point in free space(with 32 bits of precision).\n\
00160 # It is recommeded to use Point wherever possible instead of Point32. \n\
00161 # \n\
00162 # This recommendation is to promote interoperability. \n\
00163 #\n\
00164 # This message is designed to take up less space when sending\n\
00165 # lots of points at once, as in the case of a PointCloud. \n\
00166 \n\
00167 float32 x\n\
00168 float32 y\n\
00169 float32 z\n\
00170 ================================================================================\n\
00171 MSG: sensor_msgs/ChannelFloat32\n\
00172 # This message is used by the PointCloud message to hold optional data\n\
00173 # associated with each point in the cloud. The length of the values\n\
00174 # array should be the same as the length of the points array in the\n\
00175 # PointCloud, and each value should be associated with the corresponding\n\
00176 # point.\n\
00177 \n\
00178 # Channel names in existing practice include:\n\
00179 # \"u\", \"v\" - row and column (respectively) in the left stereo image.\n\
00180 # This is opposite to usual conventions but remains for\n\
00181 # historical reasons. The newer PointCloud2 message has no\n\
00182 # such problem.\n\
00183 # \"rgb\" - For point clouds produced by color stereo cameras. uint8\n\
00184 # (R,G,B) values packed into the least significant 24 bits,\n\
00185 # in order.\n\
00186 # \"intensity\" - laser or pixel intensity.\n\
00187 # \"distance\"\n\
00188 \n\
00189 # The channel name should give semantics of the channel (e.g.\n\
00190 # \"intensity\" instead of \"value\").\n\
00191 string name\n\
00192 \n\
00193 # The values array should be 1-1 with the elements of the associated\n\
00194 # PointCloud.\n\
00195 float32[] values\n\
00196 \n\
00197 ================================================================================\n\
00198 MSG: geometry_msgs/Pose\n\
00199 # A representation of pose in free space, composed of postion and orientation. \n\
00200 Point position\n\
00201 Quaternion orientation\n\
00202 \n\
00203 ================================================================================\n\
00204 MSG: geometry_msgs/Point\n\
00205 # This contains the position of a point in free space\n\
00206 float64 x\n\
00207 float64 y\n\
00208 float64 z\n\
00209 \n\
00210 ================================================================================\n\
00211 MSG: geometry_msgs/Quaternion\n\
00212 # This represents an orientation in free space in quaternion form.\n\
00213 \n\
00214 float64 x\n\
00215 float64 y\n\
00216 float64 z\n\
00217 float64 w\n\
00218 \n\
00219 "; }
00220 public:
00221 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00222
00223 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00224
00225 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00226 {
00227 ros::serialization::OStream stream(write_ptr, 1000000000);
00228 ros::serialization::serialize(stream, header);
00229 ros::serialization::serialize(stream, scan);
00230 ros::serialization::serialize(stream, cloud);
00231 ros::serialization::serialize(stream, sensor_pose);
00232 ros::serialization::serialize(stream, barycenter);
00233 return stream.getData();
00234 }
00235
00236 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00237 {
00238 ros::serialization::IStream stream(read_ptr, 1000000000);
00239 ros::serialization::deserialize(stream, header);
00240 ros::serialization::deserialize(stream, scan);
00241 ros::serialization::deserialize(stream, cloud);
00242 ros::serialization::deserialize(stream, sensor_pose);
00243 ros::serialization::deserialize(stream, barycenter);
00244 return stream.getData();
00245 }
00246
00247 ROS_DEPRECATED virtual uint32_t serializationLength() const
00248 {
00249 uint32_t size = 0;
00250 size += ros::serialization::serializationLength(header);
00251 size += ros::serialization::serializationLength(scan);
00252 size += ros::serialization::serializationLength(cloud);
00253 size += ros::serialization::serializationLength(sensor_pose);
00254 size += ros::serialization::serializationLength(barycenter);
00255 return size;
00256 }
00257
00258 typedef boost::shared_ptr< ::laser_slam::LocalizedScan_<ContainerAllocator> > Ptr;
00259 typedef boost::shared_ptr< ::laser_slam::LocalizedScan_<ContainerAllocator> const> ConstPtr;
00260 };
00261 typedef ::laser_slam::LocalizedScan_<std::allocator<void> > LocalizedScan;
00262
00263 typedef boost::shared_ptr< ::laser_slam::LocalizedScan> LocalizedScanPtr;
00264 typedef boost::shared_ptr< ::laser_slam::LocalizedScan const> LocalizedScanConstPtr;
00265
00266
00267 template<typename ContainerAllocator>
00268 std::ostream& operator<<(std::ostream& s, const ::laser_slam::LocalizedScan_<ContainerAllocator> & v)
00269 {
00270 ros::message_operations::Printer< ::laser_slam::LocalizedScan_<ContainerAllocator> >::stream(s, "", v);
00271 return s;}
00272
00273 }
00274
00275 namespace ros
00276 {
00277 namespace message_traits
00278 {
00279 template<class ContainerAllocator>
00280 struct MD5Sum< ::laser_slam::LocalizedScan_<ContainerAllocator> > {
00281 static const char* value()
00282 {
00283 return "a4d676ce9bf4274df95bd1940071f796";
00284 }
00285
00286 static const char* value(const ::laser_slam::LocalizedScan_<ContainerAllocator> &) { return value(); }
00287 static const uint64_t static_value1 = 0xa4d676ce9bf4274dULL;
00288 static const uint64_t static_value2 = 0xf95bd1940071f796ULL;
00289 };
00290
00291 template<class ContainerAllocator>
00292 struct DataType< ::laser_slam::LocalizedScan_<ContainerAllocator> > {
00293 static const char* value()
00294 {
00295 return "laser_slam/LocalizedScan";
00296 }
00297
00298 static const char* value(const ::laser_slam::LocalizedScan_<ContainerAllocator> &) { return value(); }
00299 };
00300
00301 template<class ContainerAllocator>
00302 struct Definition< ::laser_slam::LocalizedScan_<ContainerAllocator> > {
00303 static const char* value()
00304 {
00305 return "# The reference frame and time point w.r.t which sensor pose is stored\n\
00306 # Note that header.stamp might be different from scan.header.stamp\n\
00307 Header header\n\
00308 \n\
00309 # Original scan\n\
00310 sensor_msgs/LaserScan scan\n\
00311 \n\
00312 # Point cloud in sensor frame at timepoint header.stamp, corrected for robot movement\n\
00313 sensor_msgs/PointCloud cloud\n\
00314 \n\
00315 # Pose of sensor in reference frame\n\
00316 geometry_msgs/Pose sensor_pose\n\
00317 \n\
00318 # Barycenter of cloud in ref frame\n\
00319 geometry_msgs/Point barycenter\n\
00320 ================================================================================\n\
00321 MSG: std_msgs/Header\n\
00322 # Standard metadata for higher-level stamped data types.\n\
00323 # This is generally used to communicate timestamped data \n\
00324 # in a particular coordinate frame.\n\
00325 # \n\
00326 # sequence ID: consecutively increasing ID \n\
00327 uint32 seq\n\
00328 #Two-integer timestamp that is expressed as:\n\
00329 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00330 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00331 # time-handling sugar is provided by the client library\n\
00332 time stamp\n\
00333 #Frame this data is associated with\n\
00334 # 0: no frame\n\
00335 # 1: global frame\n\
00336 string frame_id\n\
00337 \n\
00338 ================================================================================\n\
00339 MSG: sensor_msgs/LaserScan\n\
00340 # Single scan from a planar laser range-finder\n\
00341 #\n\
00342 # If you have another ranging device with different behavior (e.g. a sonar\n\
00343 # array), please find or create a different message, since applications\n\
00344 # will make fairly laser-specific assumptions about this data\n\
00345 \n\
00346 Header header # timestamp in the header is the acquisition time of \n\
00347 # the first ray in the scan.\n\
00348 #\n\
00349 # in frame frame_id, angles are measured around \n\
00350 # the positive Z axis (counterclockwise, if Z is up)\n\
00351 # with zero angle being forward along the x axis\n\
00352 \n\
00353 float32 angle_min # start angle of the scan [rad]\n\
00354 float32 angle_max # end angle of the scan [rad]\n\
00355 float32 angle_increment # angular distance between measurements [rad]\n\
00356 \n\
00357 float32 time_increment # time between measurements [seconds] - if your scanner\n\
00358 # is moving, this will be used in interpolating position\n\
00359 # of 3d points\n\
00360 float32 scan_time # time between scans [seconds]\n\
00361 \n\
00362 float32 range_min # minimum range value [m]\n\
00363 float32 range_max # maximum range value [m]\n\
00364 \n\
00365 float32[] ranges # range data [m] (Note: values < range_min or > range_max should be discarded)\n\
00366 float32[] intensities # intensity data [device-specific units]. If your\n\
00367 # device does not provide intensities, please leave\n\
00368 # the array empty.\n\
00369 \n\
00370 ================================================================================\n\
00371 MSG: sensor_msgs/PointCloud\n\
00372 # This message holds a collection of 3d points, plus optional additional\n\
00373 # information about each point.\n\
00374 \n\
00375 # Time of sensor data acquisition, coordinate frame ID.\n\
00376 Header header\n\
00377 \n\
00378 # Array of 3d points. Each Point32 should be interpreted as a 3d point\n\
00379 # in the frame given in the header.\n\
00380 geometry_msgs/Point32[] points\n\
00381 \n\
00382 # Each channel should have the same number of elements as points array,\n\
00383 # and the data in each channel should correspond 1:1 with each point.\n\
00384 # Channel names in common practice are listed in ChannelFloat32.msg.\n\
00385 ChannelFloat32[] channels\n\
00386 \n\
00387 ================================================================================\n\
00388 MSG: geometry_msgs/Point32\n\
00389 # This contains the position of a point in free space(with 32 bits of precision).\n\
00390 # It is recommeded to use Point wherever possible instead of Point32. \n\
00391 # \n\
00392 # This recommendation is to promote interoperability. \n\
00393 #\n\
00394 # This message is designed to take up less space when sending\n\
00395 # lots of points at once, as in the case of a PointCloud. \n\
00396 \n\
00397 float32 x\n\
00398 float32 y\n\
00399 float32 z\n\
00400 ================================================================================\n\
00401 MSG: sensor_msgs/ChannelFloat32\n\
00402 # This message is used by the PointCloud message to hold optional data\n\
00403 # associated with each point in the cloud. The length of the values\n\
00404 # array should be the same as the length of the points array in the\n\
00405 # PointCloud, and each value should be associated with the corresponding\n\
00406 # point.\n\
00407 \n\
00408 # Channel names in existing practice include:\n\
00409 # \"u\", \"v\" - row and column (respectively) in the left stereo image.\n\
00410 # This is opposite to usual conventions but remains for\n\
00411 # historical reasons. The newer PointCloud2 message has no\n\
00412 # such problem.\n\
00413 # \"rgb\" - For point clouds produced by color stereo cameras. uint8\n\
00414 # (R,G,B) values packed into the least significant 24 bits,\n\
00415 # in order.\n\
00416 # \"intensity\" - laser or pixel intensity.\n\
00417 # \"distance\"\n\
00418 \n\
00419 # The channel name should give semantics of the channel (e.g.\n\
00420 # \"intensity\" instead of \"value\").\n\
00421 string name\n\
00422 \n\
00423 # The values array should be 1-1 with the elements of the associated\n\
00424 # PointCloud.\n\
00425 float32[] values\n\
00426 \n\
00427 ================================================================================\n\
00428 MSG: geometry_msgs/Pose\n\
00429 # A representation of pose in free space, composed of postion and orientation. \n\
00430 Point position\n\
00431 Quaternion orientation\n\
00432 \n\
00433 ================================================================================\n\
00434 MSG: geometry_msgs/Point\n\
00435 # This contains the position of a point in free space\n\
00436 float64 x\n\
00437 float64 y\n\
00438 float64 z\n\
00439 \n\
00440 ================================================================================\n\
00441 MSG: geometry_msgs/Quaternion\n\
00442 # This represents an orientation in free space in quaternion form.\n\
00443 \n\
00444 float64 x\n\
00445 float64 y\n\
00446 float64 z\n\
00447 float64 w\n\
00448 \n\
00449 ";
00450 }
00451
00452 static const char* value(const ::laser_slam::LocalizedScan_<ContainerAllocator> &) { return value(); }
00453 };
00454
00455 template<class ContainerAllocator> struct HasHeader< ::laser_slam::LocalizedScan_<ContainerAllocator> > : public TrueType {};
00456 template<class ContainerAllocator> struct HasHeader< const ::laser_slam::LocalizedScan_<ContainerAllocator> > : public TrueType {};
00457 }
00458 }
00459
00460 namespace ros
00461 {
00462 namespace serialization
00463 {
00464
00465 template<class ContainerAllocator> struct Serializer< ::laser_slam::LocalizedScan_<ContainerAllocator> >
00466 {
00467 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00468 {
00469 stream.next(m.header);
00470 stream.next(m.scan);
00471 stream.next(m.cloud);
00472 stream.next(m.sensor_pose);
00473 stream.next(m.barycenter);
00474 }
00475
00476 ROS_DECLARE_ALLINONE_SERIALIZER;
00477 };
00478 }
00479 }
00480
00481 namespace ros
00482 {
00483 namespace message_operations
00484 {
00485
00486 template<class ContainerAllocator>
00487 struct Printer< ::laser_slam::LocalizedScan_<ContainerAllocator> >
00488 {
00489 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::laser_slam::LocalizedScan_<ContainerAllocator> & v)
00490 {
00491 s << indent << "header: ";
00492 s << std::endl;
00493 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00494 s << indent << "scan: ";
00495 s << std::endl;
00496 Printer< ::sensor_msgs::LaserScan_<ContainerAllocator> >::stream(s, indent + " ", v.scan);
00497 s << indent << "cloud: ";
00498 s << std::endl;
00499 Printer< ::sensor_msgs::PointCloud_<ContainerAllocator> >::stream(s, indent + " ", v.cloud);
00500 s << indent << "sensor_pose: ";
00501 s << std::endl;
00502 Printer< ::geometry_msgs::Pose_<ContainerAllocator> >::stream(s, indent + " ", v.sensor_pose);
00503 s << indent << "barycenter: ";
00504 s << std::endl;
00505 Printer< ::geometry_msgs::Point_<ContainerAllocator> >::stream(s, indent + " ", v.barycenter);
00506 }
00507 };
00508
00509
00510 }
00511 }
00512
00513 #endif // LASER_SLAM_MESSAGE_LOCALIZEDSCAN_H
00514