EKF Origin does not reset when arming?

Hi!
I use ArduCopter 3.5.5 with Pixhawk on Quadcopter with GPS RTK in Guided mode.

Today I tried to give position commands via MAVROS using RQT. After taking I gave ENU position target via publishing “mavros_msgs/setpoint_raw/local”. The vehicle moved in one direction, however according to mavros/local_position/odometry it should move to the opposite direction.
For example on takeoff the odometry (ENU) was [0,0,0], after takeoff when odometry showed [0 0 1] I gave the command [0 1 1], which with vehicle facing north had to move the vehicle forward, but it moved aft.
(The above commands work well in SITL, so it is not frames confusion…)

As I know, the origin is always set to arming position.
However while analyzing DataFlash log, I saw that the EKF never began its flight at [0,0,0] but from other location but [8, 4, -1] (NED).

Another input - as I said I use GPS RTK. It takes time to get fix, and while waiting for it, the quadcopter was in different location.

Questions

  1. Am I right that the origin is always set to arming position? Is there difference between AHRS home and EKF origin in this sense?
  2. What is the origin of odometry ENU frame in MavROS?
  3. Maybe the EKF origin remained where the vehicle got the fix?

No. The EKF origin is never reset once it is set.

Home will usually be reset to your arming position.

Hi.

So when and where is the origin set(for example if I do several flights without reboot)? Is it set where an when the quad wakes up(when I receive the message “EKF IMU origin is set to GPS”? Because I didn’t do anything active to set the origin. If so, how can I reset the origin?

Whats the difference between home and origin?

I use MavROS to track quadrotor’s position online and give navigaton targets. Seems that the mavros/odometry is reported in ENU frame which origin is arming position(“home”?) but the controller uses EKF origin? What is the way to track and command using the same frame? To reset EKF origin before takeoff? Or track another field(which one?)

Thanks a lot

Установить
Outlook для iOS

So when and where is the origin set(for example if I do several flights without reboot)? Is it set where an when the quad wakes up(when I receive the
message “EKF IMU origin is set to GPS”? Because I didn’t do anything active to set the origin. If so, how can I reset the origin?

Yes, that’s one place the origin is set.

You can artificially set the origin with a mavlink message - but once set
in any manner it can no be reset.

Whats the difference between home and origin?

origin is where the EKF’s relative numbers come from - position-north,
position-down etc etc.

home is used for things like RTL and for relative barometer stuff, and for
things like simple and super-simple modes in Copter.

I use MavROS to track quadrotor’s position online and give navigaton targets. Seems that the mavros/odometry is reported in ENU frame which origin is
arming position(“home”?) but the controller uses EKF origin? What is the way to track and command using the same frame? To reset EKF origin before
takeoff? Or track another field(which one?)

Sorry, I’ve not played with mavros :slight_smile: @khancyr might be able to answer
this one.