Open Gavriel-CTO opened 1 year ago
Not sure if it was the same problem I was having (I'm in a ROS2 fork) but in my case it was not working because there was a difference in the expected size of the ranges[] vector between ira_laser_tools and slam_toolbox.
My workaround was simply adding 1 to the calculated ranges_size in this line, from:
uint32_t ranges_size = std::ceil((output->angle_max - output->angle_min) / output->angle_increment);
to
uint32_t ranges_size = std::ceil((output->angle_max - output->angle_min) / output->angle_increment) + 1;
Decreasing by 1 worked for me as I received,
LaserRangeScan contains 1084 range readings, expected 1083
while using slamtoolbox to generate the map.
Steps to reproduce issue
Behavior
Additional information