External position estimation

I am going through the dev. docs here and I have a small doubt.

When using offboard mode with say VIO, I am practically estimating the position with both images and IMU. So, when I relay back the information using SET_POSITION_TARGET_LOCAL_NED using MAVLink protocol, is the estimator still running in the autopilot or this position information directly going to position controller?


@kvmanohar22 The position controller uses the local position estimation from the estimator on the autopilot.

If you send setpoints with SET_POSITION_TARGET_LOCAL_NED this is in the local frame estimated by the estimator on the autopilot.

Thanks a lot for the reply!

If I understand correctly, the estimator of the autopilot outputs SET_POSITION_TARGET_LOCAL_NED which is received by the position controller. And if I send (through offboard mode) SET_POSITION_TARGET_LOCAL_NED message, then my estimated setpoints are going directly to position controller. Is this it?

@kvmanohar22 No. SET_POSITION_TARGET_LOCAL_NED is the target location which the autopilot will be moving to. This is what is sent from the companion computer, not the autopilot estimator.

Setpoints are not being estimated. You are specifying the setpoint directly in the SET_POSITION_TARGET_LOCAL_NED where the autopilot should steer the vehicle to.

What is being estimated by the estimator is your current position / velocity and the autopilot uses that information to control the vehicle to the targeted setpoint.

Sorry my apologies. I mixed certain things here. I got your point.

My doubt was rather, when I publish the message VISION_POSITION_ESTIMATE or ODOMETRY as outlined here using VIO, will this position estimate directly be used by the position controller as the current position/velocity? Or will this current position be again used in the estimator to be fused with IMU using EKF2?

@kvmanohar22 It will be a observation and fused into the EKF. It will NOT override the current estimation. This will be extremely dangerous

Ah…okay. But, given that (atleast in my case. I am running entire Visual inertial SLAM on companion computer and relaying this message as VISION_POSITION_ESTIMATE) I am fusing visual information with IMU readings. So, if the autopilot again fuses this estimate with EKF, isn’t it repeating what I have already computed? Or, is there any method to instruct autopilot to skip the fusion of position/velocity estimate sent over VISION_POSITION_ESTIMATE?

I get that overriding autopilot’s estimation is dangerous, but we have developed robust estimators. So, just wanted to know more about it.

Edit: I must add that, in my visual inertial pipeline, I am fusing visual estimation with IMU readings using iSAM2.

Hi @Jaeyoung-Lim waiting for your reply.


@kvmanohar22 I think this is not a blocker for your use case. You can use similar setup as done for mocap setups as explained in the link I have provided. You can configure that your external vision input has small variance so that the EKF relies on the external vision input more.

Is “replacing” the estimator necessary? If so, then you can do so by doing position control offboard which many of the research platforms do.