Closed sevenbitbyte closed 7 years ago
@sevenbitbyte Thanks for sharing your thoughts! I certainly agree that LaserScan makes the most sense, but we had decided to use PointCloud2 for a few different reasons. To start with though, there is a launch file sweep2scan.launch
provided for doing the conversion to LaserScan and it works just fine. The main reason we chose the point cloud type is because sweep works a little differently than most traditional LiDAR scanners. Instead of one or two measurement pulses, the LidarLite sensor will send several pulses until it receives a sufficient amount of good return signal to complete a ranging. The side of effect of this is that it's not always deterministic, so we can't assume it will take measurements at even angular increments. The LaserScan msg type assumes that the distance measurements are taken at even angular increments and therefore would incorrectly represent when the measurements actually took place. The PointCloud msg type is much more flexible of course and allows us to represent the ranges at any angle.
Hope this helps!
Makes perfect sense, thanks for the explanation. Can't wait to try this out when units ship.
Typically planar LIDAR systems are supported in ROS using the
sensor_msgs/LaserScan
message type documented here rather than PointCloud2(though its great you provide this). This message type supports theangle
andsignal_strength
fields ofsweep_response_scan_packet_t
in theLaserScan.angle_*
andLaserScan.intensities
fields respectively. By correctly supporting your LIDAR using sensor_msgs/LaserScan you can fully support every bit of data coming from the sensor. There already exist many ROS tools and examples for assembling multipleLaserScan
s intoPointCloud2
s no to mention numerous navigation tools that requireLaserScan
overPointCloud2
such as gmapping. In gmapping you would force the user to convert the current PointCloud2 back to a LaserScan which is likely to be a very common use case in robotic navigation.@kent-williams