版本-4.15.1,机型-M300RTK,相机-H20T,使用WaypointV2类进行航点任务,会发生崩溃,尤其是...
已完成-
Android SDK
崩溃信息如下:
BuglyCrash errorMessage: ;errorStack = #00 pc 0000000000246c90 /data/app/com.cloudcentury.djiremotecontrol-6zIh2BG3vL_x4s0uzttjDQ==/lib/arm64/libDJIWaypointV2Core.so (_ZN3dji10waypointv213DataConverter41ConvertSDKInitializationMissionToProtocolENSt6__ndk110shared_ptrINS0_15WaypointMissionEEE+144) [arm64-v8a::]
#01 pc 0000000000215f2c /data/app/com.cloudcentury.djiremotecontrol-6zIh2BG3vL_x4s0uzttjDQ==/lib/arm64/libDJIWaypointV2Core.so (_ZN3dji10waypointv211Abstraction17InitializeMissionENSt6__ndk110shared_ptrINS0_15WaypointMissionEEENS2_8functionIFviEEE+100) [arm64-v8a::]
#02 pc 0000000000216650 /data/app/com.cloudcentury.djiremotecontrol-6zIh2BG3vL_x4s0uzttjDQ==/lib/arm64/libDJIWaypointV2Core.so (_ZN3dji10waypointv211Abstraction13UploadMissionENSt6__ndk18functionIFviEEE+572) [arm64-v8a::]
#03 pc 00000075e1c7c818 [anon:dalvik-zygote-jit-code-cache] (_ZN3dji10waypointv212LogicManager13UploadMissionEmNSt6__ndk18functionIFviEEE+220)
#04 pc 00000000001c4cb4 /data/app/com.cloudcentury.djiremotecontrol-6zIh2BG3vL_x4s0uzttjDQ==/lib/arm64/libDJIWaypointV2Core.so [arm64-v8a::] #05 pc 0000000000172468 /data/app/com.cloudcentury.djiremotecontrol-6zIh2BG3vL_x4s0uzttjDQ==/lib/arm64/libDJIWaypointV2Core.so (_ZNSt6__ndk113packaged_taskIFvvEEclEv+88) [arm64-v8a::] #06 pc 00000000001710f8 /data/app/com.cloudcentury.djiremotecontrol-6zIh2BG3vL_x4s0uzttjDQ==/lib/arm64/libDJIWaypointV2Core.so (_ZZN3dji6common6WorkerC1EvENKUlvE_clEv+520) [arm64-v8a::] #07 pc 0000000000170e78 /data/app/com.cloudcentury.djiremotecontrol-6zIh2BG3vL_x4s0uzttjDQ==/lib/arm64/libDJIWaypointV2Core.so (_ZNSt6__ndk114__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEZN3dji6common6WorkerC1EvEUlvE_EEEEEPvSC_+44) [arm64-v8a::] #08 pc 00000000000cf7c0 /apex/com.android.runtime/lib64/bionic/libc.so (_ZL15__pthread_startPv+36) [arm64-v8a::b91c775ccc9b0556e91bc575a2511cd0] #09 pc 00000000000721a8 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) [arm64-v8a::b91c775ccc9b0556e91bc575a2511cd0] java: [Failed to get Java stack] -
mission部分的代码我直接用的Demo里写的,我只是更换了action部分的代码,loadmission应该还没有走到action部分的代码吧。
action代码如下:
List<WaypointV2Action> waypointV2ActionList = new ArrayList<>();
// 第一个点
// stop Fly
WaypointTrigger waypointAction1Trigger = new WaypointTrigger.Builder()
.setTriggerType(ActionTypes.ActionTriggerType.REACH_POINT)
.setReachPointParam(new WaypointReachPointTriggerParam.Builder()
.setStartIndex(1)
.setAutoTerminateCount(0)
.build())
.build();
WaypointActuator waypointAction1Actuator = new WaypointActuator.Builder()
.setActuatorType(ActionTypes.ActionActuatorType.AIRCRAFT_CONTROL)
.setAircraftControlActuatorParam(new WaypointAircraftControlParam.Builder()
.setAircraftControlType(ActionTypes.AircraftControlType.START_STOP_FLY)
.setFlyControlParam(new WaypointAircraftControlStartStopFlyParam.Builder()
.setStartFly(false)
.build())
.build())
.build();
WaypointV2Action waypointAction1 = new WaypointV2Action.Builder()
.setActionID(1)
.setTrigger(waypointAction1Trigger)
.setActuator(waypointAction1Actuator)
.build();
waypointV2ActionList.add(waypointAction1);
// take photo
WaypointTrigger waypointAction2Trigger = new WaypointTrigger.Builder()
.setTriggerType(ActionTypes.ActionTriggerType.ASSOCIATE)
.setAssociateParam(new WaypointV2AssociateTriggerParam.Builder()
.setAssociateActionID(1)
.setAssociateType(ActionTypes.AssociatedTimingType.AFTER_FINISHED)
.setWaitingTime(0)
.build())
.build();
WaypointActuator waypointAction2Actuator = new WaypointActuator.Builder()
.setActuatorType(ActionTypes.ActionActuatorType.CAMERA)
.setCameraActuatorParam(new WaypointCameraActuatorParam.Builder()
.setCameraOperationType(ActionTypes.CameraOperationType.SHOOT_SINGLE_PHOTO)
.build())
.build();
WaypointV2Action waypointAction2 = new WaypointV2Action.Builder()
.setActionID(2)
.setTrigger(waypointAction2Trigger)
.setActuator(waypointAction2Actuator)
.build();
waypointV2ActionList.add(waypointAction2);
// take photo
WaypointTrigger waypointAction3Trigger = new WaypointTrigger.Builder()
.setTriggerType(ActionTypes.ActionTriggerType.ASSOCIATE)
.setAssociateParam(new WaypointV2AssociateTriggerParam.Builder()
.setAssociateActionID(2)
.setAssociateType(ActionTypes.AssociatedTimingType.AFTER_FINISHED)
.setWaitingTime(10)
.build())
.build();
WaypointActuator waypointAction3Actuator = new WaypointActuator.Builder()
.setActuatorType(ActionTypes.ActionActuatorType.CAMERA)
.setCameraActuatorParam(new WaypointCameraActuatorParam.Builder()
.setCameraOperationType(ActionTypes.CameraOperationType.SHOOT_SINGLE_PHOTO)
.build())
.build();
WaypointV2Action waypointAction3 = new WaypointV2Action.Builder()
.setActionID(3)
.setTrigger(waypointAction3Trigger)
.setActuator(waypointAction3Actuator)
.build();
waypointV2ActionList.add(waypointAction3);
// 偏航角
WaypointTrigger waypointAction4Trigger = new WaypointTrigger.Builder()
.setTriggerType(ActionTypes.ActionTriggerType.ASSOCIATE)
.setAssociateParam(new WaypointV2AssociateTriggerParam.Builder()
.setAssociateActionID(3)
.setAssociateType(ActionTypes.AssociatedTimingType.AFTER_FINISHED)
.setWaitingTime(20)
.build())
.build();
WaypointActuator waypointAction4Actuator = new WaypointActuator.Builder()
.setActuatorType(ActionTypes.ActionActuatorType.AIRCRAFT_CONTROL)
.setAircraftControlActuatorParam(new WaypointAircraftControlParam.Builder()
.setAircraftControlType(ActionTypes.AircraftControlType.ROTATE_YAW)
.setRotateYawParam(new WaypointAircraftControlRotateYawParam.Builder()
.setDirection(WaypointV2MissionTypes.WaypointV2TurnMode.CLOCKWISE)
.setRelative(true)
.setYawAngle(-90)
.build())
.build())
.build();
WaypointV2Action waypointAction4 = new WaypointV2Action.Builder()
.setActionID(4)
.setTrigger(waypointAction4Trigger)
.setActuator(waypointAction4Actuator)
.build();
waypointV2ActionList.add(waypointAction4);
// start fly
WaypointTrigger waypointAction5Trigger = new WaypointTrigger.Builder()
.setTriggerType(ActionTypes.ActionTriggerType.ASSOCIATE)
.setAssociateParam(new WaypointV2AssociateTriggerParam.Builder()
.setAssociateActionID(4)
.setAssociateType(ActionTypes.AssociatedTimingType.AFTER_FINISHED)
.setWaitingTime(0)
.build())
.build();
WaypointActuator waypointAction5Actuator = new WaypointActuator.Builder()
.setActuatorType(ActionTypes.ActionActuatorType.AIRCRAFT_CONTROL)
.setAircraftControlActuatorParam(new WaypointAircraftControlParam.Builder()
.setAircraftControlType(ActionTypes.AircraftControlType.START_STOP_FLY)
.setFlyControlParam(new WaypointAircraftControlStartStopFlyParam.Builder()
.setStartFly(true)
.build())
.build())
.build();
WaypointV2Action waypointAction5 = new WaypointV2Action.Builder()
.setActionID(5)
.setTrigger(waypointAction5Trigger)
.setActuator(waypointAction5Actuator)
.build();
waypointV2ActionList.add(waypointAction5);
// 第二个点
// stop Fly
WaypointTrigger waypointAction6Trigger = new WaypointTrigger.Builder()
.setTriggerType(ActionTypes.ActionTriggerType.REACH_POINT)
.setReachPointParam(new WaypointReachPointTriggerParam.Builder()
.setStartIndex(2)
.setAutoTerminateCount(0)
.build())
.build();
WaypointActuator waypointAction6Actuator = new WaypointActuator.Builder()
.setActuatorType(ActionTypes.ActionActuatorType.AIRCRAFT_CONTROL)
.setAircraftControlActuatorParam(new WaypointAircraftControlParam.Builder()
.setAircraftControlType(ActionTypes.AircraftControlType.START_STOP_FLY)
.setFlyControlParam(new WaypointAircraftControlStartStopFlyParam.Builder()
.setStartFly(false)
.build())
.build())
.build();
WaypointV2Action waypointAction6 = new WaypointV2Action.Builder()
.setActionID(6)
.setTrigger(waypointAction6Trigger)
.setActuator(waypointAction6Actuator)
.build();
waypointV2ActionList.add(waypointAction6);
// take photo
WaypointTrigger waypointAction7Trigger = new WaypointTrigger.Builder()
.setTriggerType(ActionTypes.ActionTriggerType.ASSOCIATE)
.setAssociateParam(new WaypointV2AssociateTriggerParam.Builder()
.setAssociateActionID(6)
.setAssociateType(ActionTypes.AssociatedTimingType.AFTER_FINISHED)
.setWaitingTime(0)
.build())
.build();
WaypointActuator waypointAction7Actuator = new WaypointActuator.Builder()
.setActuatorType(ActionTypes.ActionActuatorType.CAMERA)
.setCameraActuatorParam(new WaypointCameraActuatorParam.Builder()
.setCameraOperationType(ActionTypes.CameraOperationType.SHOOT_SINGLE_PHOTO)
.build())
.build();
WaypointV2Action waypointAction7 = new WaypointV2Action.Builder()
.setActionID(7)
.setTrigger(waypointAction7Trigger)
.setActuator(waypointAction7Actuator)
.build();
waypointV2ActionList.add(waypointAction7);
// 云台
WaypointTrigger waypointAction8Trigger = new WaypointTrigger.Builder()
.setTriggerType(ActionTypes.ActionTriggerType.ASSOCIATE)
.setAssociateParam(new WaypointV2AssociateTriggerParam.Builder()
.setAssociateActionID(7)
.setAssociateType(ActionTypes.AssociatedTimingType.AFTER_FINISHED)
.setWaitingTime(0)
.build())
.build();
WaypointActuator waypointAction8Actuator = new WaypointActuator.Builder()
.setActuatorType(ActionTypes.ActionActuatorType.GIMBAL)
.setGimbalActuatorParam(new WaypointGimbalActuatorParam.Builder()
.operationType(ActionTypes.GimbalOperationType.ROTATE_GIMBAL)
.rotation(new Rotation.Builder()
.mode(RotationMode.ABSOLUTE_ANGLE)
.pitch(0)
.roll(0)
.yaw(-20.0f)
.time(1)
.build())
.build())
.build();
WaypointV2Action waypointAction8 = new WaypointV2Action.Builder()
.setActionID(8)
.setTrigger(waypointAction8Trigger)
.setActuator(waypointAction8Actuator)
.build();
waypointV2ActionList.add(waypointAction8);
// start fly
WaypointTrigger waypointAction9Trigger = new WaypointTrigger.Builder()
.setTriggerType(ActionTypes.ActionTriggerType.ASSOCIATE)
.setAssociateParam(new WaypointV2AssociateTriggerParam.Builder()
.setAssociateActionID(8)
.setAssociateType(ActionTypes.AssociatedTimingType.AFTER_FINISHED)
.setWaitingTime(10)
.build())
.build();
WaypointActuator waypointAction9Actuator = new WaypointActuator.Builder()
.setActuatorType(ActionTypes.ActionActuatorType.AIRCRAFT_CONTROL)
.setAircraftControlActuatorParam(new WaypointAircraftControlParam.Builder()
.setAircraftControlType(ActionTypes.AircraftControlType.START_STOP_FLY)
.setFlyControlParam(new WaypointAircraftControlStartStopFlyParam.Builder()
.setStartFly(true)
.build())
.build())
.build();
WaypointV2Action waypointAction9 = new WaypointV2Action.Builder()
.setActionID(9)
.setTrigger(waypointAction9Trigger)
.setActuator(waypointAction9Actuator)
.build();
waypointV2ActionList.add(waypointAction9);
// 第三个点
// stop Fly
WaypointTrigger waypointAction10Trigger = new WaypointTrigger.Builder()
.setTriggerType(ActionTypes.ActionTriggerType.REACH_POINT)
.setReachPointParam(new WaypointReachPointTriggerParam.Builder()
.setStartIndex(3)
.setAutoTerminateCount(0)
.build())
.build();
WaypointActuator waypointAction10Actuator = new WaypointActuator.Builder()
.setActuatorType(ActionTypes.ActionActuatorType.AIRCRAFT_CONTROL)
.setAircraftControlActuatorParam(new WaypointAircraftControlParam.Builder()
.setAircraftControlType(ActionTypes.AircraftControlType.START_STOP_FLY)
.setFlyControlParam(new WaypointAircraftControlStartStopFlyParam.Builder()
.setStartFly(false)
.build())
.build())
.build();
WaypointV2Action waypointAction10 = new WaypointV2Action.Builder()
.setActionID(10)
.setTrigger(waypointAction10Trigger)
.setActuator(waypointAction10Actuator)
.build();
waypointV2ActionList.add(waypointAction10);
// 偏航角
WaypointTrigger waypointAction11Trigger = new WaypointTrigger.Builder()
.setTriggerType(ActionTypes.ActionTriggerType.ASSOCIATE)
.setAssociateParam(new WaypointV2AssociateTriggerParam.Builder()
.setAssociateActionID(10)
.setAssociateType(ActionTypes.AssociatedTimingType.AFTER_FINISHED)
.setWaitingTime(20)
.build())
.build();
WaypointActuator waypointAction11Actuator = new WaypointActuator.Builder()
.setActuatorType(ActionTypes.ActionActuatorType.AIRCRAFT_CONTROL)
.setAircraftControlActuatorParam(new WaypointAircraftControlParam.Builder()
.setAircraftControlType(ActionTypes.AircraftControlType.ROTATE_YAW)
.setRotateYawParam(new WaypointAircraftControlRotateYawParam.Builder()
.setDirection(WaypointV2MissionTypes.WaypointV2TurnMode.CLOCKWISE)
.setRelative(true)
.setYawAngle(20)
.build())
.build())
.build();
WaypointV2Action waypointAction11 = new WaypointV2Action.Builder()
.setActionID(11)
.setTrigger(waypointAction11Trigger)
.setActuator(waypointAction11Actuator)
.build();
waypointV2ActionList.add(waypointAction11);
// 云台
WaypointTrigger waypointAction12Trigger = new WaypointTrigger.Builder()
.setTriggerType(ActionTypes.ActionTriggerType.ASSOCIATE)
.setAssociateParam(new WaypointV2AssociateTriggerParam.Builder()
.setAssociateActionID(11)
.setAssociateType(ActionTypes.AssociatedTimingType.AFTER_FINISHED)
.setWaitingTime(0)
.build())
.build();
WaypointActuator waypointAction12Actuator = new WaypointActuator.Builder()
.setActuatorType(ActionTypes.ActionActuatorType.GIMBAL)
.setGimbalActuatorParam(new WaypointGimbalActuatorParam.Builder()
.operationType(ActionTypes.GimbalOperationType.ROTATE_GIMBAL)
.rotation(new Rotation.Builder()
.mode(RotationMode.ABSOLUTE_ANGLE)
.pitch(0)
.roll(0)
.yaw(-30.0f)
.time(1)
.build())
.build())
.build();
WaypointV2Action waypointAction12 = new WaypointV2Action.Builder()
.setActionID(12)
.setTrigger(waypointAction12Trigger)
.setActuator(waypointAction12Actuator)
.build();
waypointV2ActionList.add(waypointAction12);
// start fly
WaypointTrigger waypointAction13Trigger = new WaypointTrigger.Builder()
.setTriggerType(ActionTypes.ActionTriggerType.ASSOCIATE)
.setAssociateParam(new WaypointV2AssociateTriggerParam.Builder()
.setAssociateActionID(12)
.setAssociateType(ActionTypes.AssociatedTimingType.AFTER_FINISHED)
.setWaitingTime(0)
.build())
.build();
WaypointActuator waypointAction13Actuator = new WaypointActuator.Builder()
.setActuatorType(ActionTypes.ActionActuatorType.AIRCRAFT_CONTROL)
.setAircraftControlActuatorParam(new WaypointAircraftControlParam.Builder()
.setAircraftControlType(ActionTypes.AircraftControlType.START_STOP_FLY)
.setFlyControlParam(new WaypointAircraftControlStartStopFlyParam.Builder()
.setStartFly(true)
.build())
.build())
.build();
WaypointV2Action waypointAction13 = new WaypointV2Action.Builder()
.setActionID(13)
.setTrigger(waypointAction13Trigger)
.setActuator(waypointAction13Actuator)
.build();
waypointV2ActionList.add(waypointAction13);
waypointV2MissionOperator.uploadWaypointActions(waypointV2ActionList, new CommonCallbacks.CompletionCallback<DJIWaypointV2Error>() {
@Override
public void onResult(DJIWaypointV2Error djiWaypointV2Error) {
if (djiWaypointV2Error != null) {
ToastUtils.setResultToToast(djiWaypointV2Error.getDescription());
}
}
});
请先登录再写评论。
评论
8 条评论