AMCL ERROR on rotation

When robot rotates it created an error in where it thinks it is. Why?
Ideally I would like the robot to work like in your video examples where it rotates and map+prediction is very close.

Any config file I should change? Lidar speed? strength? IMU/ODOM covariance issues?

I’m assuming you try to follow the Autonomous Navigation tutorial about navigation with Wheel Odometry + IMU + LIDAR.

  1. Can you confirm whether you see output when running each command from checking the sensors section?
  2. Are the Odometry and Gmapping parts working correctly?
  3. When starting AMCL, the initial pose is assumed to be (0,0,0), and it won’t find the valid pose if the initial one is far from truth. You can override the pose estimate, using the 2D Pose Estimate tool in RViz to help AMCL solve the kidnapped robot problem.

Checked all sensors

rostopic echo /imu/gyro
rostopic echo /imu/accel
rostopic echo /imu/mag
rostopic echo /scan

and all are printing valid data

Odom and Gmapping working and followed tutorial.

Also noticed when the robot should show on the map moving away from an object it shows the robot moving towards an object. The direction on left/right seems inverted.

When it first starts the initial pose and boundaries of map are correct while moving forward or reverse, BUT on rotation is gets the ERROR

I fixed it by mounting the IMU correctly which in the LEO documentation there is none.

The IMU needs to be mounted upright and with center bolt opening facing forward.