Gimbal Management

2024-05-11
2.5 Ratings
2 customers rated

The header file for log management related functions is dji_gimbal_manager.h. This document describes the key information and usage of the structure and function prototypes in the dji_gimbal_manager.h file.

For the log management concepts and functions, please read the Gimbal Managementopen in new window of the PSDK Tutorial.

The header file of the PSDK PTZ management related functions is dji_gimbal_manager.h. This document describes the key information and usage of the structure and function prototypes in the dji_gimbal_manager.h file.

Catalog

Enum

Struct

T_DjiGimbalManagerRotation

Function

DjiGimbalManager_Init
DjiGimbalManager_Deinit
DjiGimbalManager_SetMode
DjiGimbalManager_Reset
DjiGimbalManager_Rotate
DjiGimbalManager_SetPitchRangeExtensionEnabled
DjiGimbalManager_SetControllerMaxSpeedPercentage
DjiGimbalManager_SetControllerSmoothFactor
DjiGimbalManager_RestoreFactorySettings

Definition, Enum and Struct

Struct T_DjiGimbalManagerRotation

Gimbal manager rotation command property.

typedef struct {
E_DjiGimbalRotationMode rotationMode; /*!< Rotation gimbal mode. */
dji_f32_t pitch; /*!< Pitch angle in degree, unit: deg */
dji_f32_t roll; /*!< Roll angle in degree, unit: deg */
dji_f32_t yaw; /*!< Yaw angle in degree, unit: deg */
dji_f64_t time; /*!< Expected execution time for gimbal rotation, in seconds. */
} T_DjiGimbalManagerRotation;

Function

Function DjiGimbalManager_Init

Initialize the gimbal manager module.

Note: This interface must be initialized after DjiCore_Init.

T_DjiReturnCode DjiGimbalManager_Init(void);
Parameter
Return
The details for the return code please refer to: DjiErrorCode

Function DjiGimbalManager_Deinit

DeInitialize the gimbal manager module.

T_DjiReturnCode DjiGimbalManager_Deinit(void);
Parameter
Return
The details for the return code please refer to: DjiErrorCode

Function DjiGimbalManager_SetMode

Set the work mode of the gimbal.

T_DjiReturnCode DjiGimbalManager_SetMode(E_DjiMountPosition mountPosition, E_DjiGimbalMode mode);
Parameter
mountPosition:gimbal mount position, input limit see enum E_DjiMountPosition
mode:gimbal work mode, input limit see enum E_DjiGimbalMode
Return
The details for the return code please refer to: DjiErrorCode

Function DjiGimbalManager_Reset

Reset the pitch and yaw of the gimbal.

T_DjiReturnCode DjiGimbalManager_Reset(E_DjiMountPosition mountPosition, E_DjiGimbalResetMode resetMode);
Parameter
mountPosition:gimbal mount position, input limit see enum E_DjiMountPosition
mode:reset mode, input limit see enum E_DjiGimbalResetMode
Return
The details for the return code please refer to: DjiErrorCode

Function DjiGimbalManager_Rotate

Rotate the angle of the gimbal.

T_DjiReturnCode DjiGimbalManager_Rotate(E_DjiMountPosition mountPosition, T_DjiGimbalManagerRotation rotation);
Parameter
mountPosition:gimbal mount position, input limit see enum E_DjiMountPosition
rotation:the rotation parameters to be executed on the target gimbal, including the rotation mode, target
Return
The details for the return code please refer to: DjiErrorCode

Function DjiGimbalManager_SetPitchRangeExtensionEnabled

! Prototype of callback function used to enable or disable extended pitch axis angle range.

Note: Switching the gimbal limit euler angle of pitch axis to the extended limit angle or the default limit angle.

T_DjiReturnCode DjiGimbalManager_SetPitchRangeExtensionEnabled(E_DjiMountPosition mountPosition, bool enabledFlag);
Parameter
mountPosition:gimbal mount position, input limit see enum E_DjiMountPosition
enabledFlag:flag specifying whether to enable or disable the extended pitch axis angle range..
Return
The details for the return code please refer to: DjiErrorCode

Function DjiGimbalManager_SetControllerMaxSpeedPercentage

Set max speed percentage for gimbal controller.

T_DjiReturnCode DjiGimbalManager_SetControllerMaxSpeedPercentage(E_DjiMountPosition mountPosition, E_DjiGimbalAxis axis, uint8_t maxSpeedPercentage);
Parameter
mountPosition:gimbal mount position, input limit see enum E_DjiMountPosition
axis:axis to be set.
maxSpeedPercentage:max speed value. Recommended calculation formula is "spd = default_max_spd x / 100",
Return
The details for the return code please refer to: DjiErrorCode

Function DjiGimbalManager_SetControllerSmoothFactor

Set smooth factor for gimbal controller, using for smooth control.

T_DjiReturnCode DjiGimbalManager_SetControllerSmoothFactor(E_DjiMountPosition mountPosition, E_DjiGimbalAxis axis, uint8_t smoothingFactor);
Parameter
mountPosition:gimbal mount position, input limit see enum E_DjiMountPosition
axis:axis to be set.
smoothingFactor:smooth factor. A larger value results in slower gimbal acceleration. Recommended
Return
The details for the return code please refer to: DjiErrorCode

Function DjiGimbalManager_RestoreFactorySettings

Restore factory settings of gimbal, including fine tune angle, pitch angle extension enable flag and max speed etc.

T_DjiReturnCode DjiGimbalManager_RestoreFactorySettings(E_DjiMountPosition mountPosition);
Parameter
mountPosition:gimbal mount position, input limit see enum E_DjiMountPosition
Return
The details for the return code please refer to: DjiErrorCode

If you have any comments or confusion about our documentation, you can click here to give feedback and we will get back to you as soon as possible.