Robotics StackExchange | Archived questions

Problem with slam_toolbox / Map and Laserscan do not align

Hi there!

I am running ROS Melodic on an Raspberry PI 1 Type B to pimp my dusty Roomba 5xx. Writing the driver and using the Roomba Open Interface was the easy part. I also mounted a YDLiDAR X4 on the Roomba, which also works quite well in my stack. However, there are some problems where I need some hints about how to further debug what is going on while using slam_toolbox.

I took the slamtoolbox onlinesync configuration as a baseline, and did some tests to generate a map while driving the robot around. Visualization with RViz shows some strange effects. The laserscan does not align with the map, and it also takes some seconds to get a new odom->map transform, and sometimes the transform seems to be skewed. See the attached screenshot, the red arrow is the current position and odometry, red dots are the laserscan, and the map from slam_toolbox is the background.

image description

I also observed a correlation between map updates and odom publication intervalls. Publishing odometry with 10 hertzs leeds to better results than publishing with 20 herzt, which is from my point of view counter-intuitive. In both cases I observed smaller or larger skews as seen in the RViz screenshot.

I really don't know whats going on here, so I am really thankful for all kinds of help. Things I have already checked:

Thank you all for your time, and please let me know if you have hints or suggestions to point me in the right direction.

Mirko

Asked by Mirko Sertic on 2021-10-25 13:49:29 UTC

Comments

Answers

After some testing, I'd like to share my insights with the community.

It seemed odometry was buggy. In fact, calculated velocities where buggy. Exporting the odometry over time and visualising it gives showed me some errors (Sorry, I can't attach a screenshot yet).

Right after a direction change issued by a cmd_vel command velocities were calculated wrong, resulting in some odd spikes for a very short period of time. After a few ms, everything normalized again.

So just as a note to me and maybe others: plotting your data really helps to get a clue what want wrong.

Asked by Mirko Sertic on 2022-03-29 04:37:54 UTC

Comments