Manually setting EKF Origin in Multi Robot Systems

Dear all,

following up on this discussion I’m looking for a way to manually set the EKF origin. The motivation is to have a common origin among multiple vehicles.

Currently, we apply a primitive patch to the EKF3 that prohibits GPS to set the origin and enables changing the origin.

Then, we set the origin manually through MAVROS’ set_gp_origin topic which sends a SET_GPS_GLOBAL_ORIGIN message to ArduPilot.

This works but is a bit hacky since the copter now relies on the external software setting the origin and cannot be used anymore for manual or mission flights.

We would like to contribute a method to the ArduCopter firmware that enables to manually set the origin in a coherent and safe way without breaking existing functionality and safety mechanisms.

Could you please share your thoughts

  • whether you think this is feasible,
  • how ArduCopter would need to be adapted, and
  • which safety considerations to keep in mind.

Thank you for your support!

3 Likes

@Paul_Riseborough: Do you think this could be possible? Maybe through a parameter that can be added to the if clauses in:

Changing the EKF public origin is currently blocked if the origin has already been set or GPS has been set as the main source of position.

An upstream fix enabling this would need to consider all of the places where the public origin is used and satisfy the reviewers that there was no race condition that could result in an inconsistency in origin for some operation immediately after a set was performed.

1 Like