How to get accurate local position without gps

I am trying to convert uorb topic “vehicle_odometry” into “nav_msgs/Odometry” in order to do slam using only pixhawk without gps module.

However, when I was testing the position and velocity at Imu, I found that the position and velocity are totally wrong. Only Imu accleration and Imu angular velocity are correct.

It means that The data sensed by IMU are reliable but the position and velocity estimated by EKF are incorrect.

Here is the data logging when I was walking in straight line. I walked forward for 10 seconds and stopped for 10 seconds. After that, I walked foward for 20 seconds and stopped for 20 seconds. Finally, I turned back and walked toward initial point within 30 seconds in the same straight line and stopped for 30 seconds. I can reach the initial point finally.

I did the same testing on the same line for twice. One is tested without GPS and another one is tested with GPS.

Position and Velocity are come from uorb topic “vehicle_odometry”. Accleration is come from uorb topic “sensor_accel” and Angular velocity is come from uorb topic “sensor_gyro”.

Without GPS:
Position


Velocity

Acceleration

Angular Velocity

With GPS:
Position


Velocity

Acceleration

Angular Velocity

From above data, we can see that the position and velocity of “vehicle_odometry” are reason reasonable when there is GPS. However, when there is no GPS, there will be negative velocity after I have done the movement. The negative velocity made the position going from positive to negative.

My question is, is there any parameter I need to change in order to get accurate position and velocity with only Imu? I want to do slam without gps and with only Imu sensor on the pixhawk.

1 Like

After a lot of research, I found that it is not possible to do position estimation accurately using only Imu in the pixhawk.

In order to do slam or position estimation accurately without gps, we need to use IMU with other non-gps sensors.

That’s correct. However, also note that when no aiding sensor is available, EKF2 starts a “fake position” fusion to maintain healthy covariances and prevent unbounded attitude drift, this is also the reason why the estimated position is always slowly pulled back to zero.

3 Likes

Ah dang, I wonder if it would ever be possible to do position estimate with just an IMU on pixhawk :thinking:

1 Like

@junwoo0914 when you want to estimate position from accelerations you’re integrating twice, so small accel measurement errors quickly add up to considerable amounts. Over longer time frames it’s not really feasible without other sources as corrections.

3 Likes

Hmm, yea to have precise position estimates, assumptions like footsteps (shown in video below) would be necessary :thinking:

1 Like