java.lang.Object | ||
↳ | dji.sdk.base.DJIBaseComponent | |
↳ | dji.sdk.gimbal.DJIGimbal |
DJIGimbal is the class for controlling the view
of the drone. If you want to have a practical view and want to have a
first person view of the drone, gimbal could provide a special view for
you. Also, if the objective is only focusing on one direction, the DJIGimbal
could automatically stabilize the gimbal.
You could use the DJIGimbal class to change the angle for detecting objects.
However, except the Inspire 1 series, pitch of the gimbal is the only one direction which
could be changed. Other directions, like roll and yaw, should be adjusted by
turning the heading of the drone.
The gimbal has an acceleromoter and gyroscope that enable it to determine the orientation and
position of the camera at any moment, and it stabilizes the camera through rotation around
3 axes. These rotational directions, known as pitch, yaw, and roll, completely describe where
the camera is pointing. Each axis has a motor. The Inertial Measurement Unit (IMU) on the gimbal
measures changes in rotation about all 3 axes, and compensates through the gimbal's motors. This
is how the camera remains completely stable. The motor on each axis has stops (limits of
movement), having a range of motion corresponding to a range of angular values, such as -180 to
180 degrees. The gimbal also operates according to a time component, which determines how quickly
it moves through space to stabilize the camera.
Axes of Rotation
Yaw measures an object’s rotation about the vertical axis. Adjusting the yaw will keep the
aircraft horizontal, but change the direction it is facing.
Pitch measures an object’s rotation about the lateral axis. Adjusting the pitch will tilt
the aircraft forwards or backwards.
Roll measures an object’s rotation about the longitudinal axis. Adjusting the roll will
tilt the aircraft left or right.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | DJIGimbal.GimbalAdvancedSettingsStateUpdateCallback | Supported only by Osmo This interface provides the method to receive the updated state and user configuration. |
|||||||||
interface | DJIGimbal.GimbalBatteryRemainingEnergyUpdateCallback | Gimbal energy remaining of Ronin MX in percent. | |||||||||
interface | DJIGimbal.GimbalStateUpdateCallback | Callback for updating the gimbal's current state. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DJIGimbal() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
configureMotorControl(DJIGimbalMotorControlPreset cameraPreset, DJICommonCallbacks.DJICompletionCallback callback)
Configures gimbal's motor control with a preset configuration applicable for most popular cameras.
| ||||||||||
abstract void |
fineTuneGimbalRollInDegrees(float offset, DJICommonCallbacks.DJICompletionCallback callback)
The gimbal roll can be fine tuned with a custom offset.
| ||||||||||
abstract void |
getAdvancedSettingsProfile(DJICompletionCallbackWith<DJIGimbalAdvancedSettingsProfile> callback)
Gets profile for the advanced setting.
| ||||||||||
DJIGimbalAttitude |
getAttitudeInDegrees()
Returns the latest gimbal attitude data, or null if none is available.
| ||||||||||
void |
getCameraUprightEnabled(DJICompletionCallbackWith<Boolean> callback)
Supported only by Ronin MX.
| ||||||||||
double |
getCompletionTimeForControlAngleAction()
Sets the completion time, in seconds, to complete an action to control the gimbal.
| ||||||||||
void |
getControllerDeadbandOnAxis(DJIGimbalAxis direction, DJICompletionCallbackWith<Integer> callback)
Gets physical controller deadband value on an axis.
| ||||||||||
abstract void |
getControllerSmoothingOnAxis(DJIGimbalAxis axis, DJICompletionCallbackWith<Integer> callback)
Gets physical controller smoothing value on an axis.
| ||||||||||
abstract void |
getControllerSpeedOnAxis(DJIGimbalAxis axis, DJICompletionCallbackWith<Integer> callback)
Gets physical controller speed value on an axis.
| ||||||||||
void |
getEndpointInDirection(DJIGimbalEndpointDirection direction, DJICompletionCallbackWith<Integer> callback)
Gets the farthest points to which the gimbal will rotate during manual controller input.
| ||||||||||
abstract void |
getFirmwareVersion(DJICompletionCallbackWith<String> callback)
Sets the gimbal's firmware version.
| ||||||||||
void |
getGimbalControllerMode(DJICompletionCallbackWith<DJIGimbalControllerMode> callback)
Supported only by Osmo.
| ||||||||||
void |
getInverseControlEnabled(DJIGimbalAxis axis, DJICompletionCallbackWith<Boolean> callback)
Gets if the physical control is inverted for gimbal movement on an axis.
| ||||||||||
void |
getMotorControlGyroFilteringOnAxis(DJIGimbalAxis direction, DJICompletionCallbackWith<Integer> callback)
Gets the coefficient of denoising the output.
| ||||||||||
void |
getMotorControlPreControlOnAxis(DJIGimbalAxis direction, DJICompletionCallbackWith<Integer> callback)
Gets the value for pre-adjust.
| ||||||||||
void |
getMotorControlStiffnessOnAxis(DJIGimbalAxis direction, DJICompletionCallbackWith<Integer> callback)
Gets the coefficient of speed error control.
| ||||||||||
void |
getMotorControlStrengthOnAxis(DJIGimbalAxis direction, DJICompletionCallbackWith<Integer> callback)
Gets the coefficient of attitude accuracy control.
| ||||||||||
void |
getMotorEnabled(DJICompletionCallbackWith<Boolean> callback)
Supported only by Ronin MX.
| ||||||||||
abstract void |
getPitchRangeExtensionEnabled(DJICompletionCallbackWith<Boolean> callback)
Get the extend gimbal pitch range state.
| ||||||||||
abstract void |
getSmoothTrackAccelerationOnAxis(DJIGimbalAxis axis, DJICompletionCallbackWith<Integer> callback)
Gets SmoothTrack acceleration on an axis.
| ||||||||||
abstract void |
getSmoothTrackDeadbandOnAxis(DJIGimbalAxis axis, DJICompletionCallbackWith<Integer> callback)
Supported only by Osmo
Gets SmoothTrack deadband on an axis. | ||||||||||
abstract void |
getSmoothTrackEnabledOnAxis(DJIGimbalAxis axis, DJICompletionCallbackWith<Boolean> callback)
Gets whether an axis has SmoothTrack enabled.
| ||||||||||
abstract void |
getSmoothTrackSpeedOnAxis(DJIGimbalAxis axis, DJICompletionCallbackWith<Integer> callback)
Gets gimbal SmoothTrack speed on an axis.
| ||||||||||
Map<DJIGimbalCapabilityKey, DJIParamCapability> |
gimbalCapability()
Returns the gimbal's features and possible range of settings.
| ||||||||||
boolean |
isConnected()
This method provides the connection status to detect whether the gimbal is connected.
| ||||||||||
void |
loadFactorySettings(DJICommonCallbacks.DJICompletionCallback callback)
Restores the gimbal's settings to factory settings.
| ||||||||||
abstract void |
resetGimbal(DJICommonCallbacks.DJICompletionCallback callback)
Resets the gimbal.
| ||||||||||
abstract void |
rotateGimbalByAngle(DJIGimbalRotateAngleMode angleMode, DJIGimbalAngleRotation pitch, DJIGimbalAngleRotation roll, DJIGimbalAngleRotation yaw, DJICommonCallbacks.DJICompletionCallback callback)
Rotate the gimbal's pitch, roll, and yaw in Angle Mode.
| ||||||||||
abstract void |
rotateGimbalBySpeed(DJIGimbalSpeedRotation pitch, DJIGimbalSpeedRotation roll, DJIGimbalSpeedRotation yaw, DJICommonCallbacks.DJICompletionCallback callback)
Rotate the gimbal's pitch, roll, and yaw in Speed Mode.
| ||||||||||
abstract void |
setAdvancedSettingsProfile(DJIGimbalAdvancedSettingsProfile userConfigType, DJICommonCallbacks.DJICompletionCallback callback)
Sets the advanced settings profile.
| ||||||||||
void |
setCameraUprightEnabled(boolean enabled, DJICommonCallbacks.DJICompletionCallback callback)
Allows the camera to be mounted in the upright position (on top of the aircraft instead of underneath).
| ||||||||||
void |
setCompletionTimeForControlAngleAction(double completionTimeForControlAngleAction)
Sets the completion time, in seconds, to complete an action to control the gimbal.
| ||||||||||
void |
setControllerDeadbandOnAxis(DJIGimbalAxis direction, int deadband, DJICommonCallbacks.DJICompletionCallback callback)
Sets physical controller (e.g.
| ||||||||||
abstract void |
setControllerSmoothingOnAxis(DJIGimbalAxis axis, int smoothing, DJICommonCallbacks.DJICompletionCallback callback)
Sets physical controller (e.g.
| ||||||||||
abstract void |
setControllerSpeedOnAxis(DJIGimbalAxis axis, int speed, DJICommonCallbacks.DJICompletionCallback callback)
Sets physical controller (e.g.
| ||||||||||
void |
setEndpointInDirection(DJIGimbalEndpointDirection direction, int endpoint, DJICommonCallbacks.DJICompletionCallback callback)
Endpoint settings determine the farthest points to which the gimbal will rotate during manual controller input.
| ||||||||||
abstract void |
setGimbalAdvancedSettingsStateUpdateCallback(DJIGimbal.GimbalAdvancedSettingsStateUpdateCallback gimbalConfigUpdateCallback)
Support only by Osmo
Sets up the gimbal advanced setting state update callback. | ||||||||||
void |
setGimbalBatteryRemainingEnergyUpdateCallback(DJIGimbal.GimbalBatteryRemainingEnergyUpdateCallback gimbalBatteryLifeUpdateCallback)
Sets the gimbal remaining energy callback.
| ||||||||||
void |
setGimbalControllerMode(DJIGimbalControllerMode gimbalControlMode, DJICommonCallbacks.DJICompletionCallback callback)
Supported only by Osmo.
| ||||||||||
abstract void |
setGimbalStateUpdateCallback(DJIGimbal.GimbalStateUpdateCallback gimbalStateUpdateCallback)
Sets up the gimbal state update callback.
| ||||||||||
abstract void |
setGimbalWorkMode(DJIGimbalWorkMode workMode, DJICommonCallbacks.DJICompletionCallback callback)
Sets the gimbal's work mode.
| ||||||||||
void |
setInverseControlEnabled(boolean enabled, DJIGimbalAxis axis, DJICommonCallbacks.DJICompletionCallback callback)
Inverts the physical control for gimbal movement on an axis.
| ||||||||||
void |
setMotorControlGyroFilteringOnAxis(DJIGimbalAxis direction, int filtering, DJICommonCallbacks.DJICompletionCallback callback)
Sets the coefficient of denoising the output.
| ||||||||||
void |
setMotorControlPreControlOnAxis(DJIGimbalAxis direction, int precontrol, DJICommonCallbacks.DJICompletionCallback callback)
Sets the value for pre-adjust.
| ||||||||||
void |
setMotorControlStiffnessOnAxis(DJIGimbalAxis direction, int stiffness, DJICommonCallbacks.DJICompletionCallback callback)
Sets the coefficient of speed error control.
| ||||||||||
void |
setMotorControlStrengthOnAxis(DJIGimbalAxis direction, int strength, DJICommonCallbacks.DJICompletionCallback callback)
Sets the coefficient of attitude accuracy control.
| ||||||||||
void |
setMotorEnabled(boolean enabled, DJICommonCallbacks.DJICompletionCallback callback)
Supported only by Ronin MX.
| ||||||||||
abstract void |
setPitchRangeExtensionEnabled(boolean shouldExtend, DJICommonCallbacks.DJICompletionCallback callback)
Extends the pitch range of gimbal.
| ||||||||||
abstract void |
setSmoothTrackAccelerationOnAxis(DJIGimbalAxis axis, int accelerate, DJICommonCallbacks.DJICompletionCallback callback)
Sets SmoothTrack acceleration on an axis.
| ||||||||||
abstract void |
setSmoothTrackDeadbandOnAxis(DJIGimbalAxis axis, int deadband, DJICommonCallbacks.DJICompletionCallback callback)
Sets SmoothTrack deadband on an axis.
| ||||||||||
abstract void |
setSmoothTrackEnabledOnAxis(DJIGimbalAxis axis, boolean enabled, DJICommonCallbacks.DJICompletionCallback callback)
Enables SmoothTrack for the axis.
| ||||||||||
abstract void |
setSmoothTrackSpeedOnAxis(DJIGimbalAxis axis, int speed, DJICommonCallbacks.DJICompletionCallback callback)
Sets gimbal SmoothTrack catch up speed on an axis.
| ||||||||||
abstract void |
startGimbalAutoCalibration(DJICommonCallbacks.DJICompletionCallback callback)
Starts calibrating the gimbal.
| ||||||||||
void |
startGimbalBalanceTest(DJICommonCallbacks.DJICompletionCallback callback)
Supported only by Ronin MX.
| ||||||||||
void |
toggleGimbalSelfie(DJICommonCallbacks.DJICompletionCallback callback)
Supported only by Osmo
Enables quick and easy selfie setup. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
Configures gimbal's motor control with a preset configuration applicable for most popular cameras. In order to the optimize the performance, motor control tuning is still required.
cameraPreset | The preset configuration to set. |
---|---|
callback | The completion callback that receives execution result. |
The gimbal roll can be fine tuned with a custom offset. The range for the custom offset is [-2.0, 2.0] degrees. If the offset is negative, the gimbal will be fine tuned the specified number of degrees in the anticlockwise direction.
offset | Fine-tune value in degrees to be set. |
---|---|
callback | The execution callback with the returned execution result. |
Gets profile for the advanced setting. Use DJIGimbalCapabilityKey.AdvancedSettingsProfile
in
gimbalCapability
to check if it is supported by the gimbal.
callback | Completion callback that receives the execution result. |
---|
Returns the latest gimbal attitude data, or null if none is available.
Supported only by Ronin MX.>
Gets if the camera is allowed to be in the upright position.
callback | The execution callback with the returned value(s). |
---|
Sets the completion time, in seconds, to complete an action to control the gimbal. If
the method rotateGimbalByAngle
is used to control the gimbal's absolute
angle,this property is used to determine in what duration of time the gimbal should
rotate to its new position. For example, if the value of this property is set to 2.0
seconds, the gimbal will rotate to its target position in 2.0 seconds.
Range is [0.1,25.5] seconds.
Gets physical controller deadband value on an axis. A larger deadband requires more controller movement to start
gimbal motion.
Use DJIGimbalCapabilityKey.ControllerDeadbandYaw
and DJIGimbalCapabilityKey.ControllerDeadbandPitch
with gimbalCapability
to check if the gimbal supports this feature.
direction | The axis to query. |
---|---|
callback | The completion callback that receives execution result. |
Gets physical controller smoothing value on an axis. Smoothing controls the deceleration of the gimbal.
Use DJIGimbalCapabilityKey.ControllerSmoothingYaw
and DJIGimbalCapabilityKey.ControllerSmoothingPitch
with gimbalCapability
to check if the gimbal supports this feature.
axis | The axis to query. |
---|---|
callback | The completion block that receives execution result. |
Gets physical controller speed value on an axis. Speed setting controls the mapping between the movement of the
controller and the gimbal speed.
Use DJIGimbalCapabilityKey.ControllerSpeedYaw
and DJIGimbalCapabilityKey.ControllerSpeedPitch
with gimbalCapability
to check if the gimbal supports this feature.
axis | The axis to query. |
---|---|
callback | The completion block that receives execution result. |
Gets the farthest points to which the gimbal will rotate during manual controller input.
Supported only by Ronin MX.
Use DJIGimbalCapabilityKey.EndpointPitchUp
, DJIGimbalCapabilityKey.EndpointPitchDown
,
DJIGimbalCapabilityKey.EndpointYawLeft
and DJIGimbalCapabilityKey.EndpointYawRight
with
gimbalCapability
to check if the gimbal supports this feature.
direction | The axis to query. |
---|---|
callback | The completion callback that receives execution result. |
Sets the gimbal's firmware version.
callback | The execution callback with the returned value(s). |
---|
Supported only by Osmo.> Gets the gimabl control mode.
callback | The execution callback with the returned value(s). |
---|
Gets if the physical control is inverted for gimbal movement on an axis. It is only supported by Osmo Mobile. The setting can only be applied to the pitch or yaw axis.
axis | The axis to query. |
---|---|
callback | The execution callback with the returned value(s). |
Gets the coefficient of denoising the output. It is only supported by Ronin MX.
Use DJIGimbalCapabilityKey.MotorControlGyroFilteringPitch
, DJIGimbalCapabilityKey.MotorControlGyroFilteringYaw
and DJIGimbalCapabilityKey.MotorControlGyroFilteringRoll
to check if it is supported by the gimbal.
direction | The axis to query. |
---|---|
callback | The completion callback that receives execution result. |
Gets the value for pre-adjust. It can be seen as the coefficient for the derivative term in PID controller. It
is
only supported by Ronin MX.
Use DJIGimbalCapabilityKey.MotorControlPrecontrolPitch
, DJIGimbalCapabilityKey.MotorControlPrecontrolYaw
and DJIGimbalCapabilityKey.MotorControlPrecontrolRoll
to check if it is supported by the gimbal.
direction | The axis to query. |
---|---|
callback | The completion callback that receives execution result. |
Gets the coefficient of speed error control. It can be seen as the coefficient for the proportional term in PID
controller. It is only supported by Ronin MX.
Use DJIGimbalCapabilityKey.MotorControlStiffnessPitch
, DJIGimbalCapabilityKey.MotorControlStiffnessYaw
and DJIGimbalCapabilityKey.MotorControlStiffnessRoll
to check if it is supported by the gimbal.
direction | The axis to query. |
---|---|
callback | The completion callback that receives execution result. |
Gets the coefficient of attitude accuracy control. It can be seen as the coefficient for the integral term in
PID
controller. It is only supported by Ronin MX.
Use DJIGimbalCapabilityKey.MotorControlStrengthPitch
, DJIGimbalCapabilityKey.MotorControlStrengthYaw
and DJIGimbalCapabilityKey.MotorControlStrengthRoll
to check if it is supported by the gimbal.
direction | The axis to query. |
---|---|
callback | The completion callback that receives execution result. |
Supported only by Ronin MX.>
Gets if the motor is enabled to work or not.
callback | The execution callback with the returned value(s). |
---|
Get the extend gimbal pitch range state. It is only supported by Phantom 3 Series and Phantom 4.
callback | The completion callback that receives execution result. |
---|
Gets SmoothTrack acceleration on an axis.
Acceleration determines how closely the camera will follow the translated yaw handle movement.
Use DJIGimbalCapabilityKey.SmoothTrackAccelerationPitch
and DJIGimbalCapabilityKey.SmoothTrackAccelerationYaw
with gimbalCapability
to check if the gimbal supports this feature.
axis | Gimbal axis. |
---|---|
callback | The execution callback with the returned value(s). |
Supported only by Osmo
Gets SmoothTrack deadband on an axis. A larger deadband requires more handle movement to translate into gimbal
motion.
Use DJIGimbalCapabilityKey.SmoothTrackDeadbandPitch
and DJIGimbalCapabilityKey.SmoothTrackDeadbandYaw
with gimbalCapability
to check if the gimbal supports this feature.
axis | Gimbal axis. |
---|---|
callback | The execution callback with the returned value(s). |
Gets whether an axis has SmoothTrack enabled. It is only supported by Osmo. Ronin MX supports SmoothTrack but it
is always enabled for both pitch axis and yaw axis.
Use DJIGimbalCapabilityKey.SmoothTrackEnabledPitch
and DJIGimbalCapabilityKey.SmoothTrackEnabledYaw
with gimbalCapability
to check if the gimbal supports this feature.
axis | The axis to query. |
---|---|
callback | The completion callback that receives execution result. |
Gets gimbal SmoothTrack speed on an axis. SmoothTrack speed determines how fast the gimbal will catch up with a
large,
Use DJIGimbalCapabilityKey.SmoothTrackSpeedPitch
and DJIGimbalCapabilityKey.SmoothTrackSpeedYaw
with gimbalCapability
to check if the gimbal supports this feature.
axis | Gimbal axis. |
---|---|
callback | The execution callback with the returned value(s). |
Returns the gimbal's features and possible range of settings.
Each key is a possible gimbal feature and is in DJIGimbalCapabilityKey
enum.
The value for each key is an instance of DJIParamCapability
or its sub-classes.
The isSupported
property can be used to query if a feature is supported by the gimbal
and the getMin
and getMax
methods of DJIParamCapabilityMinMax
can be used
to query
the valid range for the setting. When a feature is not supported, the values returned by
getMin
and getMax
are undefined.
This method provides the connection status to detect whether the gimbal is connected.
Restores the gimbal's settings to factory settings.
callback | The completion callback that receives execution result. |
---|
Resets the gimbal. The behaviours are product-dependent. Osmo series (e.g. Osmo, Osmo Pro): The gimbal's pitch and yaw will be set to the origin, which is the standard position for the gimbal. Phantom series (e.g. Phantom 3 Professional, Phantom 4): The first call sets gimbal to point down vertically to the earth. The second call sets gimbal to the standard position. Other products (e.g. Inspire 1): Only the gimbal's pitch will the set to the origin.
callback | The execution callback with the returned execution result. |
---|
Rotate the gimbal's pitch, roll, and yaw in Angle Mode. The direction can either be set to
clockwise or counter-clockwise.
For Phantom 3 Professional, Phantom 3 Advanced and Phantom 3 Standard, roll and yaw rotations are not available.
For Inspire 1, Inspire Pro and M100, pitch, roll and yaw rotations are available.
For Osmo, roll rotation is not available.
angleMode | Gimbal's angle mode. |
---|---|
pitch | Gimbal's pitch rotation. |
roll | Gimbal's roll rotation direction. |
yaw | Gimbal's yaw rotation direction. |
callback | The execution callback with the returned execution result. |
Rotate the gimbal's pitch, roll, and yaw in Speed Mode. The direction can either be set to
clockwise or counter-clockwise.
For Phantom 3 Professional, Phantom 3 Advanced and Phantom 3 Standard, roll and yaw rotations are not available.
For Inspire 1, Inspire Pro and M100, pitch, roll and yaw rotations are available.
For Osmo, roll rotation is not available. The yaw angleVelocity of DJIGimbalSpeedRotation range is (0, 120).
pitch | Gimbal's pitch rotation. |
---|---|
roll | Gimbal's roll rotation. |
yaw | Gimbal's yaw rotation. |
callback | The execution callback with the returned execution result. |
Sets the advanced settings profile. The advanced settings profile has options for both preset and custom
profiles
for SmoothTrack and Controller settings. Settings for SmoothTrack and Controller can only be set manually when
using a custom profile.
Use DJIGimbalCapabilityKey.AdvancedSettingsProfile
in gimbalCapability
to check if it
is supported by the gimbal.
Supported only by Osmo.
userConfigType | Profile to set. |
---|---|
callback | Completion block that receives the execution result. |
Allows the camera to be mounted in the upright position (on top of the aircraft instead of underneath).
Supported only by Ronin MX.>
enabled | true> to allow the camera to be upright. |
---|---|
callback | The execution callback with the returned execution result. |
Sets the completion time, in seconds, to complete an action to control the gimbal. If
the method rotateGimbalByAngle
is used to control the gimbal's absolute
angle,this property is used to determine in what duration of time the gimbal should
rotate to its new position. For example, if the value of this property is set to 2.0
seconds, the gimbal will rotate to its target position in 2.0 seconds.
Range is [0.1,25.5] seconds.
completionTimeForControlAngleAction | the completion time |
---|
Sets physical controller (e.g. the joystick on Osmo or the remote controller of the aircraft) deadband on an
axis. A larger deadband requires more controller movement to start gimbal motion.
Use DJIGimbalCapabilityKey.ControllerDeadbandYaw
and DJIGimbalCapabilityKey.ControllerDeadbandPitch
with gimbalCapability
to check if the gimbal supports this feature and the range of possible values
(unitless).
direction | The axis that the setting will be applied to. |
---|---|
deadband | The deadband value to be set. |
callback | The completion callback that receives execution result. |
Sets physical controller (e.g. the joystick on Osmo or the remote controller of the aircraft) smoothing on an
axis. Smoothing controls the deceleration of the gimbal.
Use DJIGimbalCapabilityKey.ControllerSmoothingYaw
and DJIGimbalCapabilityKey.ControllerSmoothingPitch
with gimbalCapability
to check if the gimbal supports this feature.
axis | The axis that the setting will be applied to. |
---|---|
smoothing | The smoothing value to be set. |
callback | The completion block that receives execution result. |
Sets physical controller (e.g. the joystick on Osmo or the remote controller of the aircraft) speed on an axis.
Speed setting controls the mapping between the movement of the controller and the gimbal speed.
Use DJIGimbalCapabilityKey.ControllerSpeedYaw
and DJIGimbalCapabilityKey.ControllerSpeedPitch
with gimbalCapability
to check if the gimbal supports this feature.
axis | The axis that the setting will be applied to. |
---|---|
speed | The speed value to be set. |
callback | The completion callback that receives execution result. |
Endpoint settings determine the farthest points to which the gimbal will rotate during manual controller input.
Supported only by Ronin MX.
Use DJIGimbalCapabilityKey.EndpointPitchUp
, DJIGimbalCapabilityKey.EndpointPitchDown
,
DJIGimbalCapabilityKey.EndpointYawLeft
and DJIGimbalCapabilityKey.EndpointYawRight
with
gimbalCapability
to check if the gimbal supports this feature and what the valid range of enpoints
are.
direction | The direction that the setting will be applied to. |
---|---|
endpoint | The endpoint value to set. |
callback | The completion callback that receives execution result. |
Support only by Osmo
Sets up the gimbal advanced setting state update callback.
Sets the gimbal remaining energy callback. The unit is percentage. This method is only supported by Ronin MX Gimbal.
gimbalBatteryLifeUpdateCallback | The execution callback. |
---|
Supported only by Osmo.> The control mode for the gimbal controller (joystick for Osmo). The total controller deflection is a combination of horizontal and vertical deflection. This translates to gimbal movement around the yaw and pitch axes. The gimbal can be set to either move in both yaw and pitch simultaneously based on horizontal and vertical deflection of the controller, or move in only yaw or pitch exclusively based on whether horizontal or vertical deflection is larger. Only supported by Osmo.
gimbalControlMode | See enum named DJIGimbalControllerMode in DJIGimbal to find
details on different gimbal stick control modes. |
---|---|
callback | The execution callback with the returned execution result. |
Sets up the gimbal state update callback.
Sets the gimbal's work mode. See enum DJIGimbalWorkMode for modes.
workMode | Gimbal work mode to be set. |
---|---|
callback | The execution callback with the returned execution result. |
Inverts the physical control for gimbal movement on an axis. It is only supported by Osmo Mobile. The setting can only be applied to the pitch or yaw axis.
enabled | true to enable inverted control. |
---|---|
axis | The axis that the setting will be applied to. |
callback | The execution callback with the returned execution result. |
Sets the coefficient of denoising the output. It is only supported by Ronin MX.
Use DJIGimbalCapabilityKey.MotorControlGyroFilteringPitch
, DJIGimbalCapabilityKey.MotorControlGyroFilteringYaw
and DJIGimbalCapabilityKey.MotorControlGyroFilteringRoll
to check if it is supported by the gimbal.
direction | The axis that the setting is applied to. |
---|---|
filtering | The gyro filtering value to set. |
callback | The completion callback that receives execution result. |
Sets the value for pre-adjust. It can be seen as the coefficient for the derivative term in PID controller. It
is
only supported by Ronin MX.
Use DJIGimbalCapabilityKey.MotorControlPrecontrolPitch
, DJIGimbalCapabilityKey.MotorControlPrecontrolYaw
and DJIGimbalCapabilityKey.MotorControlPrecontrolRoll
to check if it is supported by the gimbal.
direction | The axis that the setting is applied to. |
---|---|
precontrol | The Precontrol value to set. |
callback | The completion callback that receives execution result. |
Sets the coefficient of speed error control. It can be seen as the coefficient for the proportional term in PID
controller. It is only supported by Ronin MX.
Use DJIGimbalCapabilityKey.MotorControlStiffnessPitch
, DJIGimbalCapabilityKey.MotorControlStiffnessYaw
and DJIGimbalCapabilityKey.MotorControlStiffnessRoll
to check if it is supported by the gimbal.
direction | The axis that the setting is applied to. |
---|---|
stiffness | The stiffness value to set. |
callback | The completion callback that receives execution result. |
Sets the coefficient of attitude accuracy control. It can be seen as the coefficient for the integral term in
PID
controller. It is only supported by Ronin MX.
Use DJIGimbalCapabilityKey.MotorControlStrengthPitch
, DJIGimbalCapabilityKey.MotorControlStrengthYaw
and DJIGimbalCapabilityKey.MotorControlStrengthRoll
to check if it is supported by the gimbal.
direction | The axis that the setting is applied to. |
---|---|
strength | The strength value to set. |
callback | The completion callback that receives execution result. |
Supported only by Ronin MX.>
Turns on and off the gimbal motors. false> means the gimbal power remains on, however the motors will
not
work.
Supported only by Ronin MX.
enabled | true> to enable the motor. |
---|---|
callback | The execution callback with the returned execution result. |
Extends the pitch range of gimbal. Currently, it is only supported by Phantom 3 Series, Phantom 4 and Phantom 4 Pro. If extended, the gimbal's pitch control range can be [-30, 90], otherwise, it's [0, 90]. Use `DJIGimbalParamPitchRangeExtension` to check if it is supported by the gimbal.
shouldExtend | Whether the pitch range should be extended |
---|---|
callback | The completion callback that receives execution result. |
Sets SmoothTrack acceleration on an axis.
Acceleration determines how closely the camera will follow the translated yaw handle movement.
Use DJIGimbalCapabilityKey.SmoothTrackAccelerationPitch
and DJIGimbalCapabilityKey.SmoothTrackAccelerationYaw
with gimbalCapability
to check if the gimbal supports this feature.
axis | Gimbal axis. |
---|---|
accelerate | SmoothTrack acceleration [0,30]. |
callback | The execution callback with the returned execution result. |
Sets SmoothTrack deadband on an axis. A larger deadband requires more handle movement to translate into gimbal
motion.
Use DJIGimbalCapabilityKey.SmoothTrackDeadbandPitch
and DJIGimbalCapabilityKey.SmoothTrackDeadbandYaw
with gimbalCapability
to check if the gimbal supports this feature.
axis | Gimbal axis. |
---|---|
deadband | SmoothTrack deadband [0,90]. |
callback | The execution callback with the returned execution result. |
Enables SmoothTrack for the axis. It is only supported by Osmo. Ronin MX supports SmoothTrack but it is always
enabled for both pitch axis and yaw axis.
Use DJIGimbalCapabilityKey.SmoothTrackEnabledPitch
and DJIGimbalCapabilityKey.SmoothTrackEnabledYaw
with gimbalCapability
to check if the gimbal supports this feature.
axis | The axis that the setting will be applied to. |
---|---|
enabled | true |
callback | The completion callback that receives execution result. |
Sets gimbal SmoothTrack catch up speed on an axis. SmoothTrack speed determines how fast the gimbal will catch up with a large, translated handle movement.
axis | Gimbal axis. |
---|---|
speed | SmoothTrack speed. |
callback | The execution callback with the returned execution result. |
Starts calibrating the gimbal. The product should be stationary (not flying, or being held) and horizontal during calibration. For gimbal's with adjustable payloads, the payload should be present and balanced before doing a calibration.
callback | The execution callback with the returned execution result. |
---|
Supported only by Ronin MX.>
Starts testing the balance of the gimbal payload.
For gimbals that allow payloads to be changed, a balance test should be performed to ensure the camera is
mounted
correctly (the camera center of gravity needs to be aligned with where the gimbal expects it to be). The test
will take about 30 seconds and isTestingBalance
can be monitored for progress with the result in
GimbalBalanceTestRollResult
and GimbalBalanceTestPitchResult
.
The product should be stationary (not flying, or being held) and horizontal during testing. See `DJIGimbalState`
for the test result.
callback | The execution callback with the returned value(s). The callback will execute when the balance test is successfully started. |
---|
Supported only by Osmo
Enables quick and easy selfie setup.
If the gimbal yaw is not at 180 degrees, then calling this method will rotate the gimbal yaw to 180 degrees
(effectively pointing
the camera to the person holding the gimbal).
If the gimbal yaw is at 180 degrees, then the gimbal will rotate in yaw to 0 degrees.
callback | The execution callback with the returned execution result. |
---|