V4最新版本,M300+H20T,V2航点任务,使用定时/定距航点动作,报错:The actuator state ...
Completed-
动作搭配逻辑如下日志所示:到达航点转云台,然后设置定时/定距拍照,最后一个动作是按照你们之前要求的,说是固件原因会导致最后一个动作不执行所以随便添加一个动作
当前正在设置的航点为 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 -
我用的航点动作分别是:
转云台:
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();
Please sign in to leave a comment.
Comments
12 comments