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

Offboard only RC lost failsafe #16534

Closed
benjinne opened this issue Jan 11, 2021 · 0 comments · Fixed by #18160
Closed

Offboard only RC lost failsafe #16534

benjinne opened this issue Jan 11, 2021 · 0 comments · Fixed by #18160
Labels
Mode: Offboard Offboard mode control

Comments

@benjinne
Copy link
Contributor

Describe problem solved by the proposed feature
For my use case, I need a way to failsafe only on RC lost when using offboard. This is because we sometimes have issues with our RC transmitter when flying offboard and we need to be able to take over at any time otherwise the RC lost failsafe must execute.

Describe your preferred solution
I've got 3 proposals to address my solution in order that I desire.

  1. Add a rc_lost condition to the code here:

    case commander_state_s::MAIN_STATE_OFFBOARD:

     if (status_flags.offboard_control_signal_lost) {
     	if (status->rc_signal_lost) {
     		// Offboard and RC are lost
     		enable_failsafe(status, old_failsafe, mavlink_log_pub, reason_no_rc_and_no_offboard);
     		set_offboard_loss_nav_state(status, armed, status_flags, offb_loss_act);
    
     	} else {
     		// Offboard is lost, RC is ok
     		enable_failsafe(status, old_failsafe, mavlink_log_pub, reason_no_offboard);
     		set_offboard_loss_rc_nav_state(status, armed, status_flags, offb_loss_rc_act);
     	}
    
     } else if (rc_lost) {
     	/* RC is lost, when required for safety */
     	enable_failsafe(status, old_failsafe, mavlink_log_pub, reason_no_rc);
     	set_link_loss_nav_state(status, armed, status_flags, internal_state, rc_loss_act);
    
     } else {
     	status->nav_state = vehicle_status_s::NAVIGATION_STATE_OFFBOARD;
     }
    

`
2. Add another parameter to failsafe in offboard when only RC is lost.
3. Use the offboard controller to sense RC is lost then change the mode to failsafe.

This first solution changes the existing standard that when RC is lost it should not affect any automatic modes. To keep this functionality, the rc failsafe can be set to disabled so that way it will not affect offboard, however this would remove the following use case: when the user wants rc failsafe enabled in manual modes but not in offboard for the same flight.

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

Successfully merging a pull request may close this issue.

2 participants