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

RTL issues with multiCopter #8257

Closed
santiago3dr opened this issue Nov 8, 2017 · 13 comments
Closed

RTL issues with multiCopter #8257

santiago3dr opened this issue Nov 8, 2017 · 13 comments
Assignees
Labels

Comments

@santiago3dr
Copy link

Quadcopter running pixracer (v4)
two possibly related issues

  • upon engaging RTL, copter does not climb to set RTL altitude
  • if engaging RTL twice in the same flight, the second instance of RTL veers in the wrong direction; heading is corrected half way through the return path

both issues present:
https://logs.px4.io/plot_app?log=a229d06a-b4f6-4333-ae1c-246c3f90f8b1
https://logs.px4.io/plot_app?log=c6d5b63b-c467-491b-83b3-cfb39064abeb

altitude issue present:
https://logs.px4.io/plot_app?log=f999958f-6a2f-419a-8a1c-e812045e8be7

using the same version of master on fixed wing, RTL looks to be working fine:
RTL set to 60m:
engaging rtl below set altitude:
https://logs.px4.io/plot_app?log=ac6e62a9-6c02-4e3d-a9c3-132c2adfd0c8

engaging rtl above set altitude:
https://logs.px4.io/plot_app?log=2ead01d6-a13d-4df6-b261-54c1ec2137ab

@dagar @sanderux @priseborough

@r0gelion r0gelion assigned r0gelion and sanderux and unassigned r0gelion Nov 8, 2017
@dagar dagar added the bug label Nov 9, 2017
@dagar
Copy link
Member

dagar commented Nov 9, 2017

The veering in the wrong direction particularly concerns me.

@dagar
Copy link
Member

dagar commented Nov 9, 2017

The climb is broken because the default MC max return altitude (-1 to disable) is respected. https://github.com/PX4/Firmware/blob/master/src/modules/navigator/rtl.cpp#L78

image

@dagar
Copy link
Member

dagar commented Nov 9, 2017

@santiago3dr could you expand on the second point? Is it only the heading that's wrong, or does RTL actually fly in the wrong direction?

image

image

@dagar dagar added this to the Release v1.7.0 milestone Nov 9, 2017
@dagar dagar self-assigned this Nov 9, 2017
@santiago3dr
Copy link
Author

just ran 2 flights on the same copter to replicate this issue
https://logs.px4.io/plot_app?log=ddbab0b2-d1e5-4f3b-8371-7d30915499ba
https://logs.px4.io/plot_app?log=6cced4c1-6a59-4a23-a67f-68c72032ccea

none of the rtl attempts rose to set rtl altitude
in the first flight, the second and third rtl engagements veered in the wrong direction, correcting half way and on the second flight, this happened only on the third attempt at engaging rtl

@santiago3dr
Copy link
Author

was able to reproduce this on the snapdragon flight controller (EAGLE)
https://logs.px4.io/plot_app?log=5f0f6037-8fd8-416d-a0c4-f00b6494e677

it seems rtl finds a direct path to the first rtl trajectory
@dagar

@MaEtUgR
Copy link
Member

MaEtUgR commented Nov 12, 2017

Could very well be related to #6679 (comment)
FYI @Stifael

dagar added a commit that referenced this issue Nov 12, 2017
@dagar
Copy link
Member

dagar commented Nov 12, 2017

Fix for the altitude here - #8272

@Stifael
Copy link
Contributor

Stifael commented Nov 12, 2017

Or we would bring this #8101 in.
That get_rtl_altitude function is not needed anymore

@Stifael
Copy link
Contributor

Stifael commented Nov 13, 2017

The problem with the strange rtl direction behavior sounds familiar, and the issue was caused by having the previous setpoint not reset correctly. I will look into it today.

dagar added a commit that referenced this issue Nov 14, 2017
@dagar
Copy link
Member

dagar commented Nov 14, 2017

Please give this PR a try. #8272

@Stifael
Copy link
Contributor

Stifael commented Nov 14, 2017

I confirmed now that one issue (there might be more than that) is that the previous setpoint gets reset to the wrong setpoint.
For instance:

  • vehicle is in mission
  • user/system demands rtl -> current setpoint is equal to home setpoint
  • user demands again mission: previous setpoint gets set to current setpoint, which is set to home. Consequently, the vehicle will follow the line home-current setpoint.

@dagar
Copy link
Member

dagar commented Nov 14, 2017

@santiago3dr various navigator fixes have made it into master. Please reopen if this isn't completely resolved.

@santiago3dr
Copy link
Author

@dagar
tested with master, 3 attempts at RTL, all successful; all rose to set altitude and took a direct path to home location
https://logs.px4.io/plot_app?log=4f166b9d-fd36-452c-be7b-9d2b600f1561

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants