[Android] Detecting when Virtual Stick refuses to move due to Obstacle Avoidance
已完成I am developing an app that flies autonomously with Advanced Mode Virtual Sticks sending velocities to the drone. When the drone nears an obstacle, it correctly brakes and refuses to fly into the obstacle. Is there any way of properly detecting when this has occurred?
Drone tested: Mavic 3E
Things I have tried that do not seem to work
- Listening to FlightAssistantKey.KeyIsBraking (not triggered)
- Listening to FlightAssistantKey.KeyActiveBreakEngaged (not triggered)
- Listening to FlightAssistantKey.KeyIsActivelyAvoidingObstacle (not triggered)
- Using ObstacleDataListener from PerceptionManager to detect when an obstacle is within the braking distance (drone brakes before reaching this braking distance causing this not to trigger)
Additional Questions
- What braking distance does virtual sticks use to stop the drone from colliding with obstacles? It seems to consistently come to a stop before reaching the defined braking distance.
I currently have a really hacky workaround where I check the aircraft's velocity against the intended velocity to detect if it has come to a stop to know if it has triggered the automatic braking due to obstacle detection but many edge cases make this solution extremely difficult to work with.
-
We do not have a Key to listen for the aircraft's imminent braking status. The aircraft should start decelerating when the obstacle distance reaches the ObstacleAvoidanceWarningDistance. Have you confirmed this in actual testing? I am also in communication with the team to see if there are other ways to confirm the aircraft's imminent braking. Thank you. -
The ObstacleAvoidanceWarningDistance was set to 15m but the drone only seemed to react differently when approaching the ObstacleAvoidanceBrakingDistance of 1m. The drone consistently stopped before reaching the 1m distance. I'm not sure exactly how far this was. The obstacle avoidance itself seems to be working with no issue. I just wanted to know if there is any good way of observing when the braking status. Be sure to keep me updated when the team gets back to you. Thanks!
-
I appreciate your patience. Currently, there is no way to obtain the status of the aircraft braking in the Mavic 3 Enterprise series. However, the aircraft's flight mode may change. You can monitor FlightControllerKey.KeyFlightMode. When the aircraft is braking, the FlightMode may change to APAS or AUTO_AVOIDANCE. Additionally, if you need to control the aircraft to approach obstacles, you may need to consider setting ObstacleAvoidanceBrakingDistance to the minimum value or even directly disabling the obstacle avoidance function. Please ensure flight safety in this scenario.
请先登录再写评论。
评论
4 条评论