-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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
Plane: support DO_RETURN_PATH_START
mission item and command
#28574
base: master
Are you sure you want to change the base?
Conversation
can you explain how this differs from do_land_start? if it is used anywhere in the mission an RTL will just jump to the closest mission leg and continue? a bit confused |
@Hwurzburg I did a demo for copter, at that time the waypoint was going to be called |
Doesn't currently replace the functionality in that PR - doesn't force loops to be considered "done". |
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.
did anyone measure the CPU cost for max mission size when this went into copter?
we also have larger missions now, as can be on microsd
@@ -1056,11 +1056,27 @@ MAV_RESULT GCS_MAVLINK_Plane::handle_command_int_packet(const mavlink_command_in | |||
case MAV_CMD_DO_GO_AROUND: | |||
return plane.trigger_land_abort(packet.param1) ? MAV_RESULT_ACCEPTED : MAV_RESULT_FAILED; | |||
|
|||
case MAV_CMD_DO_RETURN_PATH_START: | |||
// attempt to rejoin after the next DO_RETURN_PATH_START command in the mission | |||
if (plane.have_position && plane.mission.jump_to_closest_mission_leg(plane.current_loc)) { |
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.
I'm a little worried about CPU usage - could we watchdog from calling this with a complex mission? might be worth measuring the CPU cost on a F4 per WP and think about max WP count
@@ -116,12 +115,26 @@ void ModeRTL::navigate() | |||
// return here so we don't change the radius and don't run the rtl update_loiter() | |||
return; | |||
} | |||
// mode change failed, revert force resume flag | |||
plane.mission.set_force_resume(false); |
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.
is this a separate bug fix? or related somehow?
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.
Related in that the same pattern is in the new case. If the mode change failed then mission was left with force resume true. This means the next time you enter auto you will resume the mission and not restart ignoring MIS_RESTART
1 if it is set.
edit: I'm sure you spotted it but we set set_force_resume(true)
before we try and change mode up on line 113
I would note that this had been supported for longer than missions on SD card. No CPU measurement were done at the time. First it scans the mission for edit: If we decide its a issue it would be quite easy to just consider the first 10 or 20 |
@tridge I have done some testing. You totally can get it to watchdog if you fill your mission full of Currently the limit is a search of 254 points per Note that although we don't get a watchdog, we also get long loops on 4367 |
I have added that 1000 point limit in #28608 |
Adds support for the
DO_RETURN_PATH_START
mission item to plane. Alternate to #28571DO_RETURN_PATH_START
is marks that the vehicle can rejoin the mission at any point after that waypoint and before a landing or aDO_LAND_START
. The mission will be re-joined on the leg which is closest to the vehicles current location.I had wanted to get rid of
RTL_AUTOLAND
and have a AUTO RTL mode as we do in copter. But I have not got to that yet.