SDK control in Attitude mode not possible

Comments

16 comments

  • DJI Developer Support
    [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.
    0
    Comment actions Permalink
  • Tobias Nägeli

    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?

    0
    Comment actions Permalink
  • DJI Developer Support
    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.
    0
    Comment actions Permalink
  • Tobias Nägeli
    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.
    1
    Comment actions Permalink
  • DJI Developer Support
    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.
    0
    Comment actions Permalink
  • Tobias Nägeli

    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.05

    Is there anything that we could test or do as a workaround in the meantime in order to continue working?

    Best regards, Tobias Nägeli

    0
    Comment actions Permalink
  • DJI Developer Support
    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.
    0
    Comment actions Permalink
  • Tobias Nägeli

    Thanks for the fast answer

    As you suggested, we disabled obstacle avoidance in all directions, both visual and radar.

    Unfortunately,  we are still not able to control the drone, both with or without the remote control being turned on.

    0
    Comment actions Permalink
  • Tobias Nägeli

    Hi All

    Is there anything we can do or test at this moment?

     

    Best regards, Tobias Nägeli

    0
    Comment actions Permalink
  • DJI Developer Support
    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.
    0
    Comment actions Permalink
  • Stan Smith

    Any updates on this? Also, Tobias, what happens when you start in ATTI mode?

    0
    Comment actions Permalink
  • Tobias Nägeli

    Stan Smith

    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.

    0
    Comment actions Permalink
  • Stan Smith

    Tobias, I left a message on your website and pinged you on LinkedIn. Perhaps we can brainstorm together.

    0
    Comment actions Permalink
  • Pedro Lima Corçaque

    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

    0
    Comment actions Permalink
  • Tobias Nägeli

    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

    0
    Comment actions Permalink
  • Pedro Lima Corçaque

    Hi Tobias Nägeli

    - 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

    0
    Comment actions Permalink

Please sign in to leave a comment.