hector_slam loses track of robot rotation

asked 2021-03-14 08:16:05 -0600

feoranis26 gravatar image

updated 2021-03-14 09:57:39 -0600

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".

edit retag flag offensive close merge delete

Comments

Is your odometry any good, how is it generated? Is only rotation an issue?

bob-ROS gravatar image bob-ROS  ( 2021-03-14 09:36:23 -0600 )edit

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.

feoranis26 gravatar image feoranis26  ( 2021-03-14 09:58:49 -0600 )edit

Hectorslam appears to support having no odometry source, have you tried not using it?

bob-ROS gravatar image bob-ROS  ( 2021-03-14 11:11:25 -0600 )edit

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.

feoranis26 gravatar image feoranis26  ( 2021-03-14 11:13:21 -0600 )edit

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.

buzzport93 gravatar image buzzport93  ( 2021-03-15 10:45:34 -0600 )edit