M300 Detecting collision avoidance brake is active.
CompletedGreetings.
I am developing an Android app for an M300 RTK drone and would like to detect when the drone is actively braking due to the collision avoidance sensors so that I play a sound on the app and display a message.
I have tried using the FlightController's setStateCallback function so that when any updates occur, using the FlightControllerState I could check if flightControllerState.isActiveBrakeEngaged() is true.
This seems to be yielding some inconsistent results: When approaching obstacles, as expected the drone brakes at the configured brake distance and refuses to continue flying, but the flightControllerState.isActiveBrakeEngaged() is not returning true.
I tried moving the drone away from the obstacle and slowly approach it again. I would say that only 1 out of 4 or 5 times the flightControllerState.isActiveBrakeEngaged() method returns true even though the drone refuses to move closer to the obstacle no matter how much I press on the joystick.
Is there a more reliable way to detect when the drone is braking due to the collision avoidance sensors being active?
I tried the setVisionControlStateUpdatedcallback method for the FlightAssistant object of the FlightController, (which uses visionControlState.isBraking() or visionControlState.isAvoidingActiveObstacleCollision()), but no luck.
Anyone else facing this issue?
Please sign in to leave a comment.
Comments
1 comment