hector_slam loses track of robot rotation
I have an RPLIDAR A1M8 mounted on my robot that I'm using for slam. Forward/backwards is fine but as soon as the robot starts rotating hector_slam won't recognize the rotation correctly and will try to create a new map on top of the existing map. The robot isn't even rotating quickly, I tried it as slow as 15 seconds for a 90 degree turn without any change. https://imgur.com/a/WUZb7PA
Edit: I've managed to get a little bit of success by increasing the map relolution to ridiculously high values like 0.25, but it still loses track after a while. It also started to give me this error: "SearchDir angle change too large
".
Is your odometry any good, how is it generated? Is only rotation an issue?
I have odometry, but it's not very good, it slips quite a lot. Rotation is the main issue but after the robot rotates the map gets distorted and slam fails altogether.
Hectorslam appears to support having no odometry source, have you tried not using it?
I don't use odometry in hector_slam at all. Also I've noticed that if I hold the lidar in my hand and move it around my room it doesn't lose track at all. If I put it back down and let the robot move by itself slam fails, even if the robot is moving slower than I moved it while I was holding it.
I am having a similar issue with hectorslam. My robot does okay when moving forward / backward but as soon as it turns, that's when everything goes wrong. I think it has to do with tf static settings, but not sure.