Sensor Position Offset Compensation

ArduPilot includes compensation for sensor placement on the vehicle. This page clarifies what parameters can be set and how they should be set.

Note

In most vehicles which have all their sensors (IMU, GPS, optical flow, etc) within 15cm of each other, it is unlikely that providing the offsets will provide a noticeable performance improvement.

../_images/sensor-position-offsets-xyz.png

The sensor’s position offsets are specified as 3 values (X, Y and Z) which are distances in meters from the IMU (which can be assumed to be in the middle of the autopilot board) or the vehicle’s center of gravity.

  • X : distance forward of the IMU or center of gravity. Positive values are towards the front of the vehicle, negative values are towards the back.

  • Y : distance to the right of the IMU or center of gravity. Positive values are towards the right side of the vehicle, negative values are towards the left.

  • Z : distance below the IMU or center of gravity. Positive values are lower, negative values are higher.

In practice the distance to the sensor can be measured from the center of the autopilot unless the autopilot itself is placed a significant distance from the vehicle’s center of gravity in which case the IMU position offsets can be specified and then the other sensor’s position offsets can be specified from the vehicle’s center of gravity.

Parameter Details

IMU (aka INS):

For the best results the autopilot (and thus the IMUs) should be placed at the center-of-gravity of the vehicle but if this is physically impossible the offset can be partially compensated for by setting the following parameters.

The compensation is only partial because ArduPilot can correct the vehicle’s velocity and position estimate but it does not correct the acceleration estimate. For example if the autopilot was placed on the nose of a vehicle and the vehicle suddenly leans back (i.e. rotates so that its nose points up) with no offset compensation the vehicle velocity estimate would momentarily show the vehicle is climbing when it’s not. With the position offsets added the velocity would not show this momentary climb. The EKF would still show a momentary vertical acceleration and because we use the acceleration in our altitude hold controllers this could still lead to the vehicle momentary reducing throttle.

Although individual position offsets can be set for each IMU, the difference between the placement of IMUs on most autopilot boards is so small that the same values can be used for all IMUs

Note

if the IMU offset is specified, then all the following offsets are relative to Center of Gravity rather than the IMU.

GPS:

Range Finder (Sonar or Lidar):

Optical Flow:

Visual Odometry: