Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Takeoff - allow publishing NAN longitude and latitude #12936

Merged
merged 3 commits into from
Sep 19, 2019
Merged

Conversation

bresch
Copy link
Member

@bresch bresch commented Sep 10, 2019

A NAN is interpreted in the FlightTaskAuto as a non-valid global coordinate and sets a local position.
If a zero is sent instead, the global coordinate is recognized as valid and will be executed.
This is a problem when the global position is gained for the first time after takeoff and that a valid global reference did not exist before

fixes #12919

To reproduce:

  • Trigger an automatic takeoff without having a global position valid but optical flow only (ekf2 stop, gps stop, ekf2 start)
  • Enable gps in air (gps start ...)
  • The drone does not fly towards longitude/latitude 0 anymore

A NAN is interpreted in the FlightTaskAuto as a non-valid global coordinate and sets a local position.
If a zero is sent instead, the global coordinate is recognized as valid and will be executed.
This is a problem when the global position is gained for the first time after takeoff and that a valid global reference did not exist before
Copy link
Contributor

@jkflying jkflying left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me this seems a major bugfix, since if we don't set them when the rep->current.lon is NaN, they remain 0.0, which is much more misleading/incorrect.

@bresch
Copy link
Member Author

bresch commented Sep 17, 2019

@PX4/testflights Could you test that PR please?
What's important here is to test autonomous takeoffs:

  • start mission from ground
  • takeoff triggered from ground station.

@jorge789
Copy link

jorge789 commented Sep 17, 2019

Tested on CUAV+ V5:
Modes Tested

Mission Plan Mode (Automated): Good.
RTL: Good.

- Procedure

  • Armed form QGC.
    Took-off on mission plan mode
    . Note that commands were sent form QGC (Armed and takeoff)
    Once all waypoint completed vehicle switched to RTL and landed as expected.
    Good flight in general.
    Notes:
    No issues noted, good flight in general.

Log:
https://review.px4.io/plot_app?log=de1e7c8b-b555-4706-b168-2d9a6d6bf4db

Tested on PixRacer V4:
Modes Tested

Mission Plan Mode (Automated): Good.
RTL: Good.

- Procedure

  • Armed form QGC.
    Took-off on mission plan mode
    . Note that commands were sent form QGC (Armed and takeoff)
    Once all waypoint completed vehicle switched to RTL and landed as expected.
    Good flight in general.
    Notes:
    No issues noted, good flight in general.

Log:
https://review.px4.io/plot_app?log=0228f5f2-5470-4d2f-9a60-cfa1091b1366

@dannyfpv
Copy link

dannyfpv commented Sep 17, 2019

Tested on Pixhawk 4 f-450

Modes Tested
Mission Plan Mode (Automated): Good.
RTL: Good.

Procedure
Armed form QGC.
Took-off on mission plan mode
Note that commands were sent form QGC (Armed and takeoff)
Once all waypoint completed vehicle switched to RTL and landed as expected.
Good flight in general.

Notes:
No issues noted good flight in general.

Log:
https://review.px4.io/plot_app?log=0ca6226f-71c0-4774-b79b-00bc7986c79f

@bresch
Copy link
Member Author

bresch commented Sep 18, 2019

@jorge789 @dannyfpv Thanks guys, that's all good.

@bresch bresch merged commit 67e528e into master Sep 19, 2019
@bresch bresch deleted the pr-takeoff-nan branch September 19, 2019 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue when getting lon/lat reference in air
5 participants