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

ArduPlane: add failsafe auto variant which skips loops #28571

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

peterbarker
Copy link
Contributor

Sometimes a mission is specifically crafted to avoid terrain and other obstacles.

In the event of a failsafe, it may be better for the vehicle to continue on the plotted course, but consider any loops to be satisfied. Naturally this may lead to the vehicle flying further in the case of a battery failsafe.

This PR adds a new failsafe type for Plane which pokes the AP_Mission library to indicate all loops should be satisfied.

A similar effect can be achieved by creating a "shadow" mission containing waypoints identical to the original mission and adding many DO_LAND_START mission items to ensure the correct next waypoint is chosen.

I'm not 100% convinced this is the correct way to approach things. One obvious issue is that if an RTL is issues then we won't continue to follow the mission, rather jump straight to the DO_LAND_START.

The original work was done on top of Plane-4.5, which was missing @IamPete1 's DO_RETURN_PATH_START code. It might be that we would be better-off adding an option into param 1 of that mission item type which specifies that all loop counters should be considered satisfied? Would also need to add support to Plane for DO_RETURN_PATH_START.

@MichelleRos

@IamPete1
Copy link
Member

I think this is a bit to specific. One problem is that I might want to jump to a DO_LAND_START or a DO_RETURN_PATH_START and skip jumps. All the combinations mean its not really practical as a fail safe action.

DO_RETURN_PATH_START is a nice solution here, although as you mention you would have to plan a "shadow" mission. I would like to bring it to plane, that bit is not too hard, what I really wanted was to bring Auto RTL mode across too which is a larger task.

How about a new command the allows completing or resetting either all or a individual jump way-point. So you could set it when you jump to a particular way-point to restart all your jumps as if it were the first time through, or you could use it as you need to here to set them all as completed.

@@ -45,6 +45,7 @@ enum failsafe_action_long {
FS_ACTION_LONG_GLIDE = 2,
FS_ACTION_LONG_PARACHUTE = 3,
FS_ACTION_LONG_AUTO = 4,
FS_ACTION_LONG_AUTO_SATISFY_JUMP_REPEATS = 5,
Copy link
Collaborator

Choose a reason for hiding this comment

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

needs to be added to param metadata

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

Successfully merging this pull request may close these issues.

4 participants