flight_review icon indicating copy to clipboard operation
flight_review copied to clipboard

Altitude setpoint plot is wrong in OFFBOARD mode

Open anassinator opened this issue 7 years ago • 2 comments

To preface, I'm not sure if this should be a Firmware or flight_review issue or both.

Problem

As it stands, in OFFBOARD mode, sending a SET_POSITION_TARGET_LOCAL_NED with a valid altitude (i.e. z coordinate), only the setpoint_triplet.current.z is set, and setpoint_triplet.current.alt remains 0 (relevant lines). This means that the altitude plot in OFFBOARD mode shows all setpoints to be at 0 altitude despite in reality possibly being something else.

Example Log

Log

Problematic plot

Problematic plot

Expected plot

Expected plot

Possible fixes

I see 2 potential fixes, but not sure either are good.

  1. Change the Firmware to set setpoint_triplet.current.alt when setting setpoint_triplet.current.z in OFFBOARD mode. This means logs taken with older firmware will still show the wrong plot though.
  2. Fallback to setpoint_triplet.current.z when setpoint_triplet.current.alt = 0 (and maybe only while in OFFBOARD mode) in flight_review.

anassinator avatar Apr 11 '18 20:04 anassinator

@anassinator I think offboard should produce log data compatible to other modes from the Firmware side. Offboard mode is currently under improvement. For better modularization of the different setpoint sources there's now a flight task architecture: https://github.com/PX4/Firmware/pull/8933 and @Stifael is currently working on the task for offboard mode. Chances are he's already aware of that inconsistency (or else he'll read this).

MaEtUgR avatar Apr 12 '18 07:04 MaEtUgR

Perfect thanks!

anassinator avatar Apr 12 '18 15:04 anassinator