how to use Velodyne VLP16 and laser_scan_matcher with cloud input?
I have a robot equipped with a 3D-Lidar (Velodyne VLP16) and want to use laser_scan_matcher ( http://wiki.ros.org/laser_scan_matcher ) to estimate it's position. The velodyne driver ( http://wiki.ros.org/velodyne_pointclo... ) publishes velodyne_points (sensor_msgs/PointCloud2) which I intend to use as input for the laser_scan_matcher by setting the use_cloud_input parameter to 'true'. The following error is produced: "Invalid number of rays". After some research I found that only 10000 rays are accepted, while there are roughly ~19000 in the PointCloud2 message.
Obviously, I could always use pointcloud_to_laserscan in between to get a /scan topic out of the velodyne_points and use it as input to the laser_scan_matcher. This works fine but I was hoping to get a better result for the position estimation if I use the PointCloud2 message directly.
My question: is there a convenient way to adjust the number of published points in the PointCloud2 message? Or is there a way to circumvent the "number of rays" restriction? I found the two following posts with similar questions/problems, if it helps:
I'm working on something similar and have the same issue. I got it working with pointcloud_to_laserscan package but I wanted to use pointcloud2 as input. Did you find a solution to the problem ?