旋转功能无法正常工作,如《 Inpire 2》

时间:2019-02-22 08:40:22

标签: dji-sdk

我试图用俯仰和偏航旋转Inspire 2的云台。当无人机不飞行时,它工作得很好。但是当无人机飞行时,它会发疯,整个飞机都会旋转。

这是我的代码或云台节距旋转:

Rotation.Builder builder = new Rotation.Builder().mode(RotationMode.ABSOLUTE_ANGLE).roll(Rotation.NO_ROTATION).
                yaw(Rotation.NO_ROTATION).pitch(lastProvidedPitch);
        Rotation rotation = builder.build();
        Aircraft aircraft = AircraftManager.getAircraft();
        aircraft.getGimbal().rotate(rotation, djiError -> {
        });

这是我的云台偏航旋转代码:

Rotation.Builder builder = new Rotation.Builder().
                mode(RotationMode.ABSOLUTE_ANGLE).roll(Rotation.NO_ROTATION).
                pitch(Rotation.NO_ROTATION).yaw(lastProvidedYaw);
        Rotation rotation = builder.build();
        Aircraft aircraft = AircraftManager.getAircraft();
        aircraft.getGimbal().rotate(rotation, djiError -> {
        });

如何确保只旋转云台而不旋转飞机?(因为它在不飞行时工作得很好)

0 个答案:

没有答案