I am implementing a panorama shooting app on android for my OSMO Pro with Zenmuse X5 using the DJI Mobile SDK (i.e. com.dji:dji-sdk:4.17). The code below used to pitch the Gimbal up and down (with corresponding pitch
values) works just fine but only when using the OSMO handheld in normal orientation i.e. having attached it to a stand while the camera is above the handheld.
When attaching the OSMO to the stand upside down i.e. now the X5 is attached in the opposite direction like it would be on my Inspire 1 drone the below code returns success but the gimbal doesn’t move at all. I also have tried this with
RotationMode.ABSOLUTE_ANGLE
for which I see the same issue.
Is there a trick to make this work or is using the OSMO upside down not supported by the SDK? Moving the gimbal directly by using the handheld hardware buttons works for both orientations.
public void pitchGimbal(float pitch, double time) {
product = DJISDKManager.getInstance().getProduct();
if (product != null && product instanceof HandHeld) {
product.getGimbal().
rotate(new Rotation.Builder()
.mode(RotationMode.RELATIVE_ANGLE)
.pitch(pitch)
.roll(Rotation.NO_ROTATION)
.yaw(Rotation.NO_ROTATION)
.time(time)
.build(), new CommonCallbacks.CompletionCallback() {
@Override
public void onResult(DJIError error) {
if (error != null && error.getDescription() != null)
showToast("Gimbal moving down result: " + error.getDescription());
}
});
} else {
showToast("Cannot reach OSMO");
}
}
Thanks a lot in advance for any help