Skip to content

Offboard failsafe circumvented by mavsdk python architecture #374

Open
@jeremyzff

Description

@jeremyzff

Issue:

MavSDK python's offboard mechanism circumvents offboard failsafe. Once offboard is started, a cothread starts sending offboard commands. A crash in the thread publishing the setpoint updates will result in the offboard thread continuing to send stale data, so the offboard mode failsafe is not activated. This can lead to the drone being stuck with some attitude command that is unsafe.

I recognize that normal mode switching will override offboard mode, but there are situations where things happen too fast. I've attached a code that demonstrates this issue- it takes off and does roll doublets. I've manually raised an exception to simulate some error, like some unexpected data showed up which throws an unhandled exception.

I also realize that writing VERY good code to catch all possible chances of exceptions is critical, but it seems unsafe that this mechanism basically prevents the normal offboard control timeout failsafe mechanism within PX4 from working correctly.

test_crash.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions