gmapping not working for LaserScan obtained from but_velodyne_proc
Hi, I am using but_velodyne_proc package to obtain 2d laser scan sensor_msgs/LaserScan from a 3d Velodyne sensor_msgs/PointCloud2. It seems that it works fine because I can visualize laser scan and point cloud in rviz. However, problem arises when I try to use this 360 degree laser scan data with gmapping to obtain a 2d occupancy map using:
rosrun gmapping slam_gmapping scan:=/velodyne/scan
It gives me following error:
slam_gmapping: /tmp/buildd/ros-hydro-openslam-gmapping-0.1.0-2precise-20140617-1746/scanmatcher/scanmatcher.cpp:563: void GMapping::ScanMatcher::setLaserParameters(unsigned int, double*, const OrientedPoint&): Assertion `beams<2048' failed. Aborted (core dumped)
The error of "beam 2048" is coming from here. Gmapping is working fine when I am using LaserScan from the lidar installed on my robot. Do you think this is because I am feeding 360 degree scan? I can see that scan header of the lidar is coming with angle_min: -2.35619449615 angle_max: 2.35619449615, whereas header of LaserScan obtained from Velodyne is angle_min: -3.14159274101 angle_max: 3.14159274101. I am very beginner with all this stuff and do not understand the meaning of "LASER_MAXBEAMS 2048" defined in the header file. Your guideline to fix this problem is much appreciated!