V4最新版本,M300+H20T,V2航点任务,使用定时/定距航点动作,报错:The actuator state ...

Completed

Comments

12 comments

  • DJI Developer Support
    你的代码动作搭配有问题,需要把动作搭配发出来看看。M300已经支持了V5,也可以考虑换用V5版本。
    0
    Comment actions Permalink
  • yuan1011yyy

    动作搭配逻辑如下日志所示:到达航点转云台,然后设置定时/定距拍照,最后一个动作是按照你们之前要求的,说是固件原因会导致最后一个动作不执行所以随便添加一个动作

    当前正在设置的航点为 0
    当前处理后的waypointV2航点动作startIndex=0+WaypointV2Action{actionID=1, trigger=WaypointTrigger{triggerType=REACH_POINT, complexReachPointParam=null, associateParam=null, trajectoryParam=null, reachPointParam=dji.common.mission.waypointv2.Action.WaypointReachPointTriggerParam@78ae847, simpleIntervalTriggerParam=null}, actuator=WaypointActuator{actuatorType=GIMBAL, actuatorIndex=0, subActuatorIndex=0, cameraActuatorParam=null, gimbalActuatorParam=dji.common.mission.waypointv2.Action.WaypointGimbalActuatorParam@6d4b874, aircraftControlActuatorParam=null, payloadActuatorParam=null, navigationActionParam=null, djiSYSActuatorParam=null}}

    当前处理后的interval(等时/等距)waypointV2航点动作startIndex=0+WaypointV2Action{actionID=2, trigger=WaypointTrigger{triggerType=SIMPLE_INTERVAL, complexReachPointParam=null, associateParam=null, trajectoryParam=null, reachPointParam=null, simpleIntervalTriggerParam=dji.common.mission.waypointv2.Action.WaypointIntervalTriggerParam@67e119d}, actuator=WaypointActuator{actuatorType=CAMERA, actuatorIndex=0, subActuatorIndex=0, cameraActuatorParam=dji.common.mission.waypointv2.Action.WaypointCameraActuatorParam@9798612, gimbalActuatorParam=null, aircraftControlActuatorParam=null, payloadActuatorParam=null, navigationActionParam=null, djiSYSActuatorParam=null}}

    当前正在设置的航点为 1
    当前处理后的waypointV2航点动作startIndex=1+WaypointV2Action{actionID=3, trigger=WaypointTrigger{triggerType=REACH_POINT, complexReachPointParam=null, associateParam=null, trajectoryParam=null, reachPointParam=dji.common.mission.waypointv2.Action.WaypointReachPointTriggerParam@383c1e3, simpleIntervalTriggerParam=null}, actuator=WaypointActuator{actuatorType=GIMBAL, actuatorIndex=0, subActuatorIndex=0, cameraActuatorParam=null, gimbalActuatorParam=dji.common.mission.waypointv2.Action.WaypointGimbalActuatorParam@cbee7e0, aircraftControlActuatorParam=null, payloadActuatorParam=null, navigationActionParam=null, djiSYSActuatorParam=null}}

    当前处理后的interval(等时/等距)waypointV2航点动作startIndex=1+WaypointV2Action{actionID=4, trigger=WaypointTrigger{triggerType=SIMPLE_INTERVAL, complexReachPointParam=null, associateParam=null, trajectoryParam=null, reachPointParam=null, simpleIntervalTriggerParam=dji.common.mission.waypointv2.Action.WaypointIntervalTriggerParam@f2f2a99}, actuator=WaypointActuator{actuatorType=CAMERA, actuatorIndex=0, subActuatorIndex=0, cameraActuatorParam=dji.common.mission.waypointv2.Action.WaypointCameraActuatorParam@165f15e, gimbalActuatorParam=null, aircraftControlActuatorParam=null, payloadActuatorParam=null, navigationActionParam=null, djiSYSActuatorParam=null}}

    当前正在设置的航点为 2
    当前处理后的waypointV2航点动作startIndex=2+WaypointV2Action{actionID=5, trigger=WaypointTrigger{triggerType=REACH_POINT, complexReachPointParam=null, associateParam=null, trajectoryParam=null, reachPointParam=dji.common.mission.waypointv2.Action.WaypointReachPointTriggerParam@4a6993f, simpleIntervalTriggerParam=null}, actuator=WaypointActuator{actuatorType=GIMBAL, actuatorIndex=0, subActuatorIndex=0, cameraActuatorParam=null, gimbalActuatorParam=dji.common.mission.waypointv2.Action.WaypointGimbalActuatorParam@35aa20c, aircraftControlActuatorParam=null, payloadActuatorParam=null, navigationActionParam=null, djiSYSActuatorParam=null}}

    当前处理后的interval(等时/等距)waypointV2航点动作startIndex=2+WaypointV2Action{actionID=6, trigger=WaypointTrigger{triggerType=SIMPLE_INTERVAL, complexReachPointParam=null, associateParam=null, trajectoryParam=null, reachPointParam=null, simpleIntervalTriggerParam=dji.common.mission.waypointv2.Action.WaypointIntervalTriggerParam@c3ed755}, actuator=WaypointActuator{actuatorType=CAMERA, actuatorIndex=0, subActuatorIndex=0, cameraActuatorParam=dji.common.mission.waypointv2.Action.WaypointCameraActuatorParam@d1bc56a, gimbalActuatorParam=null, aircraftControlActuatorParam=null, payloadActuatorParam=null, navigationActionParam=null, djiSYSActuatorParam=null}}

    当前为绑定的航点动作,AssociateActionID:6stayTime:0.0
    当前处理后的waypointV2航点动作startIndex=3+WaypointV2Action{actionID=7, trigger=WaypointTrigger{triggerType=ASSOCIATE, complexReachPointParam=null, associateParam=dji.common.mission.waypointv2.Action.WaypointV2AssociateTriggerParam@2787137, trajectoryParam=null, reachPointParam=null, simpleIntervalTriggerParam=null}, actuator=WaypointActuator{actuatorType=AIRCRAFT_CONTROL, actuatorIndex=0, subActuatorIndex=0, cameraActuatorParam=null, gimbalActuatorParam=null, aircraftControlActuatorParam=dji.common.mission.waypointv2.Action.WaypointAircraftControlParam@75126a4, payloadActuatorParam=null, navigationActionParam=null, djiSYSActuatorParam=null}}
    准备上传V2 Action,当前需要上传的航点动作数量为:7

    0
    Comment actions Permalink
  • yuan1011yyy

    问题是现在V5 SDK内未开放自定义航点动作的API

    0
    Comment actions Permalink
  • DJI Developer Support
    MSDK V5的航点动作只用编辑KMZ就可以了。我怀疑是你到达航点转云台,和到达航点开始间隔拍照冲突了,无法在同一时间又转云台又拍照,因为固件同时只能做一件事情。
    0
    Comment actions Permalink
  • yuan1011yyy

    那我如何实现云台和间隔拍照按顺序执行?现有的动作搭配,我是通过SDK Demo自己探索实现的

    0
    Comment actions Permalink
  • DJI Developer Support
    你的reachPoint后面搭配转机头,让飞机斜着飞,进行间隔拍照,这样应该也能满足你的需求吧。转机头和间隔拍照是可以在一个点上执行的。
    0
    Comment actions Permalink
  • yuan1011yyy

    我的需求是需要云台转动到固定角度,来拍摄当前角度的图片,所以如何保证在转动云台后才开始顺序执行间隔拍照?

    0
    Comment actions Permalink
  • yuan1011yyy

    在DJI pilot里面,我的需求是可以实现的,每个航点上都依次添加云台俯仰角和间隔拍照的动作,他会按顺序执行动作,所以V4版本里我如何控制动作搭配能实现和pilot中一样的效果?

    0
    Comment actions Permalink
  • DJI Developer Support
    你现在使用得是DJI Pilot还是DJI Pilot 2呢?Pilot 2里已经在使用KMZ文件了也就是航线3.0。
    0
    Comment actions Permalink
  • yuan1011yyy

    DJI Pilot和DJI Pilot 2 均已验证,都可以实现我的需求

    0
    Comment actions Permalink
  • yuan1011yyy

    我用的航点动作分别是:

    转云台:

    WaypointTrigger.Builder triggerBuilder = new WaypointTrigger.Builder();
    triggerBuilder.setTriggerType(ActionTypes.ActionTriggerType.REACH_POINT);

    WaypointReachPointTriggerParam reachPointTriggerParam = new WaypointReachPointTriggerParam.Builder()
    .setStartIndex(waypointIndex)
    .setAutoTerminateCount(0)
    .build();

    triggerBuilder.setReachPointParam(reachPointTriggerParam);
    WaypointTrigger trigger = triggerBuilder.build();

    WaypointActuator.Builder actuatorBuilder = new WaypointActuator.Builder();
    actuatorBuilder.setActuatorType(ActionTypes.ActionActuatorType.GIMBAL);

    Rotation rotation = new Rotation.Builder()
    .mode(RotationMode.ABSOLUTE_ANGLE)
    .pitch(pitch)
    .time(2)
    .build();

    WaypointGimbalActuatorParam gimbalParam = new WaypointGimbalActuatorParam.Builder()
    .operationType(ActionTypes.GimbalOperationType.ROTATE_GIMBAL)
    .rotation(rotation)
    .build();

    actuatorBuilder.setGimbalActuatorParam(gimbalParam);

    WaypointV2Action waypointV2Action = new WaypointV2Action.Builder()
    .setActionID(actionId++)
    .setTrigger(trigger)
    .setActuator(actuatorBuilder.build())
    .build();

    等时/等距拍照

    WaypointIntervalTriggerParam intervalTriggerParam = new WaypointIntervalTriggerParam.Builder()
    .setType(isTime ? ActionTypes.ActionIntervalType.TIME : ActionTypes.ActionIntervalType.DISTANCE)
    .setStartIndex(waypointIndex)
    .setInterval(interval)
    .build();
    WaypointTrigger waypointTrigger = new WaypointTrigger.Builder()
    .setTriggerType(ActionTypes.ActionTriggerType.SIMPLE_INTERVAL)
    .setIntervalTriggerParam(intervalTriggerParam)
    .build();

    WaypointCameraActuatorParam shootActuatorParam = new WaypointCameraActuatorParam.Builder()
    .setCameraOperationType(ActionTypes.CameraOperationType.SHOOT_SINGLE_PHOTO)
    .build();
    WaypointActuator waypointActuator = new WaypointActuator.Builder()
    .setActuatorType(ActionTypes.ActionActuatorType.CAMERA)
    .setCameraActuatorParam(shootActuatorParam)
    .build();

    WaypointV2Action intervalWaypointV2Action = new WaypointV2Action.Builder()
    .setActionID(actionId++)
    .setTrigger(waypointTrigger)
    .setActuator(waypointActuator)
    .build();
    0
    Comment actions Permalink
  • DJI Developer Support
    我这边测试Pilot 2确实可以这样飞,也许不是这段代码的问题,你把其他航点动作都删除,只留一个到点转云台的动作和在该点进行间隔拍照的动作,看看是否还会报这个错误,这样可以确定问题是不是出在这。
    0
    Comment actions Permalink

Please sign in to leave a comment.