-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Rally Points: enable rally points always, independent of RTL_TYPE set… #13320
Conversation
@hamishwillee FYI |
@sfuhrer This does not quite capture our discussion. So basically the desired behaviour is exactly the same as currently, but wherever it says "goto/fallback to home" it should say "goto/fallback to closest of home or rally point". It should look like this - with change in italic w.r.t. current definitions:
|
From my perspective it makes more sense to always consider safe landing points, independent of RTL_TYPE (I know, changed my mind there lately:)). Or what would be the reason that you want to discard them for types 1 and 2 when the mission contains a landing? If you don't want to land on safe landing points then just don't put them in. And if you keep the RTL_TYPE to 1 or 2 and don't put in a mission landing, then you'd have the same behavior as you propose (lands at home or safe landing point, whatever is closest). Let's ask for a second opinion: @julianoes @DanielePettenuzzo @bkueng what are your thoughts? |
@sfuhrer is there a point of having a rally point if it is not used by RTL? So, is there a mechanism to use a rally point through a command instead of RTL? From a terminology point of view I don't like the naming RTL_TYPE and the fact that RTL would not go back to launch (Return to Launch) but rather somewhere else. I guess this one boils down to RTL meaning Return To Launch and not Return to Land. |
@julianoes no, there is now way to use it beside the RTL. Agree the this is no longer a proper RTL (launch), but just want to point out that it currently is neither (you already have the option of choosing the mission landing instead of home now). |
This terminology around Return Mode has been a debate in the past. The variables are named RTL which is refered to in the code in different places as return to launch or return to land. There is also the concept of return to home which is what often happens in reality. The solution is to always refer to the various return modes as "Return Mode" in documentation. This way there is flexibility to what the behavior is. By only using the word "Return" and no other words, it can mean anything such as Return to Launch/Land/Home/Ground/SafePoint/RallyPoint, etc |
Please keep in mind fixed wing vehicles. For fixed wings, takeoff and landing are almost always different locations (different enough where it matters to not land into a tree/fence/automobile/person!) |
@Antiheavy thanks for your comments. I agree about the naming, and hence I don't like the param name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good from my side. Do we need to update the param description as well?
Yes, good point. Done that now, please review. Also @hamishwillee please. |
src/modules/navigator/rtl_params.c
Outdated
* @value 2 Return to a planned mission landing, if available, using the mission path, else return to home via the reverse mission path | ||
* @value 3 Return via direct path to closest destination: home, mission landing pattern or safe point | ||
* @value 0 Return to closest safe point (home or rally point) via direct path. | ||
* @value 1 Return to closest safe point (planned mission landing or rally point), if available, else return to home. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- What is the benefit of ignoring home as a possible landing destination? ie. why would you choose to go to a rally point that was defined but not to home? Also the wording little odd it implies "home is not a safe point".
- The path taken is important - ie direct.
- I like the term "mission landing pattern"
So depending on your answer to 1 - one of:
- @value 1 Return to closest safe point (start of mission landing pattern, rally point, or home), via direct path. If safe point is a landing pattern then land.
- @value 1 Return to closest safe point other than home (mission landing pattern or rally point), via direct path. If no mission landing or rally points are defined return home via direct path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or to put it another way, why do we need both valy 1 and value 2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Home should only be considered for value 1 if no landing or rally point is defined because with a VTOL/FW it's safer. It the user doesn't set a rally point, then 1 results in the same behavior as is currently implemented.
Your wording sounds better, changed that (for value 1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or to put it another way, why do we need both valy 1 and value 2?
You mean between TYPE 1 and 2? That it follows the mission, either forward (mission landing) or inverse (home).
src/modules/navigator/rtl_params.c
Outdated
* @value 3 Return via direct path to closest destination: home, mission landing pattern or safe point | ||
* @value 0 Return to closest safe point (home or rally point) via direct path. | ||
* @value 1 Return to closest safe point (planned mission landing or rally point), if available, else return to home. | ||
* @value 2 Same as above (2nd option), but use the mission path (for return to mission landing), the reverse mission path (home) and direct path (rally point). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question as above for home vs rally points. Will affect how this is worded so will wait on your response.
7fd91ce
to
2289481
Compare
src/modules/navigator/rtl_params.c
Outdated
* @value 3 Return via direct path to closest destination: home, mission landing pattern or safe point | ||
* @value 0 Return to closest safe point (home or rally point) via direct path. | ||
* @value 1 Return to closest safe point other than home (mission landing pattern or rally point), via direct path. If no mission landing or rally points are defined return home via direct path. | ||
* @value 2 Same as above (2nd option), but return via mission path (for return to mission landing), via the reverse mission path (home) or via direct path (rally point). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well this is a little complicated, because what is the safe point for the mission case? The mission landing pattern or the closest waypoint? Also in current implementation behaviour differs if you're on a mission already or just flying around.
My assumption is that if you're in a mission you will always want to use this path, but perhaps that is wrong?
I can help write this, but can you confirm the assumptions?
- On a mission then fast forward to end or reverse to back, irrespective of rally points?
- Not on a mission then go to closest of rally points or nearest waypoint.
- If on mission path do fast forward or reverse depending on whether mission landing
- If no rally points or mission defined, go to home via direct path.
- If I reverse mission path, currently I then fly to home after takeoff position. Should I go to a rally point if it is closer than home at this point?
This confusion is bound to come up again in the future. However, it would be a ton of work and probably impact lots of people to go back and change all "RTL_" to "RTN_" or whatever the new param short hand would be... also many code comments should be updated to be more specific on the true behavior (return to home, return to landing pattern, return to ....).... this work is not in the scope of this PR I think. |
I've had to think about it for a while, but I still have concerns on how this impacts fixed wing behavior and generally impacts anyone choosing RTL_TYPE 1 and possibly RTL_TYPE 2. Sorry for the long post, here are my concerns: Summary: I'm not sure this change is appropriate for RTL_TYPE 1 and RTL_TYPE 2 concerns for RTL_TYPE 1: concerns for RTL_TYPE 2: concerns for fixed wing Rally Points: |
@hamishwillee @Antiheavy I've pushed a new version, now it doesn't consider rally points for RTL_TYPE=2. Figured out how it was implemented before didn't really go well with this RTL_TYPE, and as you two are anyway more reluctant to use rally points in this case I thought I just as well can take it out. Actually I don't see why somebody would want to set rally points if he sets this option, so I agree with you. So for RTL_TYPE =2 this PR doesn't change anything. I've thus also reverted the description. |
952995a
to
bcd8667
Compare
@Antiheavy I understand your concerns for FW. At the same time I think it is the users responsibility to know what it means if he sets a rally point. I don't see how somebody just sets a safe landing point somewhere without need and without being aware what it implies. And if he doesn't set a safe landing point then nothing changes with this PR.
I see that for FW this is probably not as urgent, as there I anyway doubt the usefulness of rally point. But then again, the user should be aware of that and not just set them. About your other question about the action of a FW at a safe landing point: it is the same as at home, so it will loiter. |
@sfuhrer I'm OK with this now. The rules are clear so someone can do the right thing if they want. It is a bit harder to document than they would have been with my approach :-). I'm still not convinced on the behaviour because types 1, 2 were created on the assumption that for FW you ALWAYS want to do a mission landing. That's really always, even if you you're really close to home (or a rally point). But as long as the rules are clear it is not broken.
To be annoyingly pedantic, it will do whatever the return parameters say, which by default for FW is loiter. |
Okay thanks. What's your opinion @Antiheavy ? Could you live with how it would be done with this PR? Otherwise we would need to either change the behavior depending on whether it is a VTOL or FW, or then add another parameter (or yet another other RTL_TYPE). But this then gets really messy from my point of view. |
…ting. RTL_TYPE=3 now enables taking both Home and Mission Landing into account. Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
bcd8667
to
239608c
Compare
@bkueng @julianoes this is ready to be merged from my perspective. Let's get is in and then think about how to reduce the dm_reads necessary (#13536). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 suggestions, feel free to merge.
239608c
to
8ac406e
Compare
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
8ac406e
to
414954e
Compare
Describe problem solved by this pull request
This PR is a follow-up of #12696, where safe landing points (aka rally points) where enabled.
With the above mentioned PR, safe landing points were only considered if RTL_TYPE is set to 3 (which is a new rtl_type). After giving it some more thoughts and getting feedback from others I want to change that with this PR: safe landing points are now always considered and chosen when closer then the default option (see below), plus with RTL_TYPE=3 home and mission landing are always considered. In more detail for the different RTL settings:
(RTL_TYPE = 2(reverse): same as 1, but now if mission landing is chosen, it follows the mission path in reverse)EDIT: RTL_TYPE=2 is now unchanged from current master, so it won't consider rally points for the rtl type
For me tpye 3 makes most sense for big missions (potentially VTOL/ BVLOS), where the start and landing point are not on the same place.
Test data / coverage
SITL tested.