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

Graph-based Return-To-Land #5745

Closed
wants to merge 21 commits into from
Closed

Conversation

samuelsadok
Copy link

The Return-To-Land mode now makes the vehicle return along the previously flown path. This way, crashes due to tall buildings can be avoided. The new RTL is based on a flight path tracker, which records the flight path as a graph.

The implementation was tested in unit tests (on PX4-FMUv4) and SITL, but no flight tests have been made yet. Some test paths in src/modules/navigator/navigator_tests are quite verbose, maybe I should remove them?

Memory and CPU usage depends heavily on the flight pattern. A 2-4kB bound should be sufficient for most cases. During tests, the most critical algorithm blocked the navigator for 300ms. This should not be an issue if the system behaves as designed, but we still may want to run this on a separate low-priority task instead.

The new RTL mode is now called RTLA while the old mode was renamed to RTLB and is used as a fallback for some failure modes. Also, a new RCRecover mode enables the vehicle to just return a few meters to regain a good signal. Someone with more experience with the system could integrate this such that it is invoked when needed. Changes to QGroundControl may be required to understand the new flight modes.

Previous discussions on this pull request are here: #5735

@samuelsadok
Copy link
Author

The failure of travis-ci and semaphore-ci is due to a faulty reference to std::lgamma in #include <algorithm>. I need this header for std::min and std::max. The same target (px4fmu-v1_default) builds fine on my machine. It looks like the test containers have a buggy C++ library or I'm using a part of it I'm not supposed to use. Should I just provide my own min/max functions or is there a clean fix?

@dagar
Copy link
Member

dagar commented Oct 24, 2016

FYI - travis-ci and semaphore use gcc 4.9.3 for the nuttx builds, and circle uses 5.4.

math::max(), min(), constrain() are here - https://github.com/PX4/Firmware/blob/master/src/lib/mathlib/math/Limits.hpp

@dagar
Copy link
Member

dagar commented Nov 8, 2016

Can you rebase and push to see if px4fmu-v2 has enough free flash now? The circleci failure is different. https://circleci.com/gh/PX4/Firmware/1223?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link

@samuelsadok samuelsadok closed this Nov 8, 2016
@samuelsadok samuelsadok deleted the smartrtl branch November 8, 2016 21:34
@samuelsadok
Copy link
Author

Arrgh I once again messed up the rebase, the pull request apparently gets closed and can't be reopened when I delete the branch.

@dagar
Copy link
Member

dagar commented Nov 8, 2016

Not a problem, pull requests are free.

@LorenzMeier LorenzMeier added this to the Release v1.6.0 milestone Nov 19, 2016
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.

3 participants