Mavic Enterprise Advanced Android 无人机Pitch, mRoll, mYaw,对应的俯仰角,横滚角以及偏航角速度取值范围

Completed

Comments

6 comments

  • DJI Developer Support
    RollPitchControlMode为angle,那么角度范围为[-30,30],如果RollPitchControlMode是VELOCITY,那么速度范围是[-15,15],接口文档:VerticalControlMode;如果YawControlMode为angle,角度的范围为[-180,180],如果YawControlMode为ANGULAR_VELOCITY,速度范围为[-100,100],接口文档:YawControlMode
    0
    Comment actions Permalink
  • YIf

    DJI Developer SupportDJI

    请问对于虚拟遥感来讲,如何设置偏航角,可以让无人机无论左右都可以旋转360度。

    我设置了模式为

    mFlightController.setYawControlMode(YawControlMode.ANGULAR_VELOCITY);
    再设置yaw为30度,最后只能转到30度就不转了,如何让它一直转到360度,设置100度就转到100度了
    如何设置原地转360度,你这范围就-180到180度,以及角速度100到100啊
    0
    Comment actions Permalink
  • YIf

    DJI Developer Support

    请问我设置了使用虚拟遥控器,以及开始遥控,按上升却没有立即执行,过一会才执行,是不是虚拟遥控初始化需要时间啊,有一定的延迟

    0
    Comment actions Permalink
  • DJI Developer Support
    1.如何设置偏航角,可以让无人机无论左右都可以旋转360度 -->朝一个方向持续调用sendVirtualStickFlightControlData发送转动命令。如果是angle模式,那么无人机会旋转指定的角度,但是360度超出角度范围,因此需要自行设置如何发送命令才能准确地旋转一周:如何使用虚拟摇杆控制飞机旋转至指定角度?如果是ANGULAR_VELOCITY,那么设置的是角速度,可以持续调用sendVirtualStickFlightControlData发送某一固定的角速度,理论上可以通过时间X角速度来实现转动到固定的角度。 2.请问我设置了使用虚拟遥控器,以及开始遥控,按上升却没有立即执行,过一会才执行,是不是虚拟遥控初始化需要时间啊,有一定的延迟 -->是每次使用都会出现延迟吗?使用的是什么版本的SDK?是什么机型?可否用sample复现。
    0
    Comment actions Permalink
  • YIf

    DJI Developer Support

    我按照你们的要求设置了

    //以下三组参数设置确保虚拟摇杆可以使用
    //设置相对于飞机航向、航向锁定或Home锁定的飞机飞行方向,设置飞机应该相对于飞机的前部移动。
    mFlightController.setFlightOrientationMode(FlightOrientationMode.AIRCRAFT_HEADING, null);
    //启用/禁用地形遵循模式。飞机使用板载超声系统及其向下朝下摄像机收集的高度信息,以保持地面上方相同高度的飞行。
    mFlightController.setTerrainFollowModeEnabled(false, null);
    //启用/禁用三脚架模式。三脚架模式将飞机的最大速度降至2.2mph(3.6kph),并大大降低了遥控器的控制棒灵敏度,以使用户为准确的框架提供精确性
    mFlightController.setTripodModeEnabled(false, null);
    mFlightController.setVirtualStickModeEnabled(true, null)

    然后我发送上升命名,需要等待23秒才有反应,你们官方说需要判断是否处于JOYSTICK模式,getFlightMode会变成JOYSTICK模式,可以通过这个得知是否进入成功。

    难道就不能立马进入JOYSRICK模式吗,立马发送指令上升,我还需要等待23秒,并且进行偏航操作又要等待3秒才正常。

    //判断虚拟遥控是否进入成功
    if (mFlightController.getState().getFlightMode().equals(FlightMode.JOYSTICK)) {
    if (mFlightController != null) {
    mFlightController.sendVirtualStickFlightControlData(
    new FlightControlData(
    //向飞机传送控制数据,分为俯仰角,横滚角,偏航的角速度以及垂直配置的速度
    0, 0, 0, mThrottle
    ), djiError -> {

    }
    );
    }
    }
    我用的sdk是
    implementation('com.dji:dji-sdk:4.15', {
    /**
    * Uncomment the "library-anti-distortion" if your app does not need Anti Distortion for Mavic 2 Pro and Mavic 2 Zoom.
    * Uncomment the "fly-safe-database" if you need database for release, or we will download it when DJISDKManager.getInstance().registerApp
    * is called.
    * Both will greatly reduce the size of the APK.
    */
    exclude module: 'library-anti-distortion'
    //exclude module: 'fly-safe-database'
    })
    飞机固件版本是V01.00.0300-

    飞机是Mavic 2 Enterprise Advanced ,御2行业进阶版

    每次同样操作都会出现20多秒延迟才会有反应

    0
    Comment actions Permalink
  • DJI Developer Support
    我在固件版本为01.00.0428的M2EA上使用sample测试是正常的,你用sample也是会出现这个问题的吗?
    0
    Comment actions Permalink

Please sign in to leave a comment.