Payload-SDK icon indicating copy to clipboard operation
Payload-SDK copied to clipboard

Question about obstacle avoidance with PSDK control autorithy

Open AndreaSanchini opened this issue 2 months ago • 3 comments

Hi, I have a question regarding the obstacle avoidance feature on M300 and M350 drones. Are both visual and radar obstacle avoidance activated by default when PSDK has the control autorithy or do I need to enable them using the DjiFlightController_SetXVisualObstacleAvoidanceEnableStatus and DjiFlightController_SetXRadarObstacleAvoidanceEnableStatus ?

I tried to get this information from https://developer.dji.com/doc/payload-sdk-tutorial/en/function-set/basic-function/flight-control.html but could not find an answer.

Thank you

AndreaSanchini avatar Oct 08 '25 09:10 AndreaSanchini

Agent comment from Leon in Zendesk ticket #158663:

Hello, when controlling the drone, you need to make sure the control mode is speed control mode (both vertical and horizontal), and the yaw angle control mode is angular rate mode. Obstacle avoidance will only take effect when these modes are selected. If any of the control modes is not speed mode, obstacle avoidance will not take effect.

°°°

dji-dev avatar Oct 09 '25 10:10 dji-dev

Hi, thank you for your answer,

Do I also need to enable it using the DjiFlightController_SetXVisualObstacleAvoidanceEnableStatus and DjiFlightController_SetXRadarObstacleAvoidanceEnableStatus` (where X is horizontal, upwards, downwards) or it is already active if control mode is speed control mode (both vertical and horizontal) and the yaw angle control mode is angular rate mode? This is still not clear to me.

Thank you

AndreaSanchini avatar Oct 09 '25 13:10 AndreaSanchini

Agent comment from Leon in Zendesk ticket #158663:

Hello, obstacle avoidance is enabled by default. You can re-enable it by calling these APIs. Please note: If any of your control modes do not meet the requirements, the obstacle avoidance strategy will not take effect even if you enable it.

Based on the mode you describe, obstacle avoidance will work in this state (as long as you haven't previously disabled it).

°°°

dji-dev avatar Oct 10 '25 06:10 dji-dev