SDK control in Attitude mode not possible
已完成Dear DJI community
We are developing software for autonomous indoor flights in challenging environments. To support a new generation of drones, we decided to onboard the Mavic 3 Enterprise. While testing at a client’s side we observed the following behaviour.
Issue: We are flying using the Payload SDK sending angle commands to the drone, having control authority (for details see below). We observed that the flight mode might switch from Normal mode to Attitude mode when we fly close to obstacles and/or with low ambient light present. If we fly through an area where the drone switches to attitude mode, i.e. we do not manually change the mode, we lose control authority and can no longer control the drone until visual positioning kicks in again.
Similarly, sometimes we cannot go higher unless we take over with the remote control, switch to attitude mode and switch back to N mode once visual positioning is working again.
As long as the drone’s visual positioning is working we can fly without any issues.
Question: Is there any way that one can control the drone using the Payload SDK when the drone loses visual positioning? If not, are there any other options we can try?
Thanks a lot in advance
Mark
Technical details
Payload SDK version: 3.7
Joystick mode setup: See attached image
-
[https://developer.dji.com/doc/payload-sdk-tutorial/en/function-set/basic-function/flight-control.html] Dear Tobias Nägeli, Hello, we have noticed the issue you reported. In fact, passive switching of control authority only occurs when the Payload SDK disconnects or when the aircraft returns to home/lands due to low battery. In the scenario you described, please also check if the GPS connection is normal. Typically, the aircraft enters attitude mode only when there is no GPS signal. In attitude mode, the aircraft can be controlled by the Payload SDK for flight without relying on the normal operation of visual sensors. -
Thanks for the quick response!
Since we are flying indoor we do in fact have no GPS connection but rely solely on our own visual localization.
We can also say with certainty that the PSDK does not lose connection since we regain control as soon as the internal visual positioning is restored. Are there any steps we need to take to be able to remain in or to regain control after switching to attitude mode? -
Hello, first you can subscribe to DJI_FC_SUBSCRIPTION_TOPIC_CONTROL_DEVICE in PSDK to get the information about who owns the control. Secondly, after entering the attitude mode passively (i.e. not switched by the remote controller), you can get the control again through DjiFlightController_ObtainJoystickCtrlAuthority. -
Thanks a lot for the answer!We did some further testing and could reproduce the issue:
the issue can be reproduced doint the following:- Make sure you are not connected to GPS
- Disable Visual Positioning on the remote control
- We launch our PSDK code, request control authority returns successfully
- Subscribing to DJI_FC_SUBSCRIPTION_TOPIC_CONTROL_DEVICE shows that PSDK should be in control
- We successfully invoke DjiFlightController_StartTakeoff
- We send DjiFlightController_ExecuteJoystickAction(djiFlyingCommand) with joystick settings as in the initial post above. It also returns success as status
- The drone does not move
Further, we observed that even though DJI_FC_SUBSCRIPTION_TOPIC_CONTROL_DEVICE shows that PSDK is in control, commands from the remote control are still accepted. When visual positioning is enabled, the commands from the RC are ignored as long as PSDK is controlling the drone.
Also, the behavior is the same even if the RC is turned off. -
Dear Tobias Nägeli, Thank you for providing additional information. If this is the case, it may be a bug. We will promptly align with your environment for retesting and then gather relevant information to confirm with our development team. May I inquire about the firmware versions you are using? This includes the drone firmware and the remote controller firmware. -
Thank you very much for your fast response.
See the details on the used versions:
Aircraft Version: 09.00.0505
Remote Controller Version: 02.01.0400
PSDK Version (3.9.0)
App Version: 10.0.6.10
Payload M3E Version : 11.05.02.05Is there anything that we could test or do as a workaround in the meantime in order to continue working?
Best regards, Tobias Nägeli
-
Hello Tobias Nägeli, Before proceeding with flight control in the PSDK code, you may consider setting DjiFlightController_SetHorizontalVisualObstacleAvoidanceEnableStatus and DjiFlightController_SetHorizontalRadarObstacleAvoidanceEnableStatus to a disabled state. This also includes setting DjiFlightController_SetUpwardsVisualObstacleAvoidanceEnableStatus, DjiFlightController_SetUpwardsRadarObstacleAvoidanceEnableStatus, and DjiFlightController_SetDownwardsVisualObstacleAvoidanceEnableStatus to disabled. Afterwards, when the aircraft enters attitude mode, you can deactivate the controller to see if you can continue controlling using PSDK. -
Dear Tobias Nägeli, Greetings! We appreciate your patience. Would you be able to send the logs from when you reproduced the issue to dev@dji.com? We will coordinate with the development team to investigate this matter. If it is possible to address the issue on the SDK side, we can request a specific version for you to debug. -
Thanks for asking! We are trying to debug the issue by producing logs showing the issue. This takes some time.
yes, we tested everything, also starting in ATTI mode. In ATTI mode, PSDK is not able to control the drone.
-
Hi everyone,
I've encountered a similar issue while navigating the Mavic 3E in indoor environments. While the lack of GPS isn't a problem, the drone's vision positioning system struggles in low-light conditions, causing it to switch to ATTI mode. When this happens, my application, which uses the Mobile SDK, loses control of the drone.
Regarding the note that "when visual positioning is enabled, the commands from the RC are ignored as long as PSDK is controlling the drone," I've observed a similar behavior with the Mobile SDK. This seems to be expected when the drone is controlled via VirtualStick mode. My workaround has been to stop sending commands when the Pause Button on the RC is pressed, allowing me to regain control if the drone switches to ATTI mode.
However, I'm still looking for a better solution to the "ATTI mode problem." Any suggestions would be greatly appreciated.
Best regards
-
Hi Pedro Lima Corçaque thanks for sharing this issue.
- we can not control the drone anymore via the PSDK if the drone switches to Atti mode.
- Can you confirm that this is also the case with the Mobile SDK?
- You have a workaround by pressing the "pause Button" on the RC. The it is possible to regain the control authority again even if the drone is in atti mode? can you confirm that?
best regards, Tobi
-
- we’ve encountered a similar issue with the Mobile SDK—it's not possible to control the drone in ATTI mode.
- pressing the pause button doesn't grant us control authority. Instead, we rely on the operator, a person who will be physically present during the operation, to take control of the drone using the RC.
Best regards, Pedro
请先登录再写评论。
评论
16 条评论