Slamtec / rplidar_ros

BSD 2-Clause "Simplified" License
504 stars 532 forks source link

Slam Toolbox compatibility #34

Closed chrisl8 closed 4 years ago

chrisl8 commented 4 years ago

As it is now. the RPLIDAR driver is not compatible with the latest version of Slam Toolbox.

This error will be received constantly instead: LaserRangeScan contains 360 range readings, expected 359.

Without this update, Slam Toolbox will not work with the RPLIDAR driver, however please let me know if you think there is a better solution.

The issue is explained here: SteveMacenski/slam_toolbox#278

The fix I propose forces the angle_increment to be calculated using all of the nodes, which prevents this error message from being displayed. I also updated the scan_time to keep it in sync.

chrisl8 commented 4 years ago

This is no longer necessary. Changes have been made to slam_toolbox that overcome this issue.

amjack0 commented 2 years ago

This is no longer necessary. Changes have been made to slam_toolbox that overcome this issue.

which branch of slam_toolbox has the changes? Does it work for ROS Noetic ?

chrisl8 commented 2 years ago

@amjack0 This is a good question because here it is 2022, and I'm having the "LaserRangeScan contains 1947 range readings, expected 1946" error again. Quite frustrating.

If you still need help, let me know and I'll let you know what I figure out.

Or, if you solved the issue, let me know what you figured out.

chrisl8 commented 2 years ago

@amjack0 The current released version of Slam Toolbox Noetic works with the PREVIOUS commit before they updated the SDK. That is git checkout 4f899e670bec2c9e1f26b0969f2de36d23618ef3 I believe would do it.

I'm still sorting out what changed/broke with this new release.

The author here doesn't seem to actually respond to issues or look at pull requests.

I think the long term solution is to move to ROS2 and use https://github.com/allenh1/rplidar_ros which seems to be keeping his driver in sync with ROS in general.


I can confirm that checking out the current repo and then reverting to commit git checkout 4f899e670bec2c9e1f26b0969f2de36d23618ef3 works with the latest version of Slam Toolbox on ROS Noetic.

cd ~/catkin_ws/src
git clone git@github.com:Slamtec/rplidar_ros.git
git checkout 4f899e670bec2c9e1f26b0969f2de36d23618ef3

and then build your ROS source as normal and it works.