dji error : Execution could not be executed

Viewed 1079

I have been struggling quiet sometime to be able to understand why I am receiving the error "The execution could not be executed" by the mission manager when trying to create a waypoint mission. I have attached the workflow I am working with, I would really appreciate it if you could take a look at it.

1.Initialize FlightController : 
mFlightController = ((Aircraft) product).getFlightController();
    getProductInstance().getGimbal()
                    .rotate(new Rotation.Builder().pitch(-180)
                            .mode(RotationMode.SPEED)
                            .yaw(Rotation.NO_ROTATION)
                            .roll(Rotation.NO_ROTATION)
                            .time(0)
                            .build(), new CommonCallbacks.CompletionCallback() {
                                @Override
                                public void onResult(DJIError error) {
                                }
                    });
mFlightController.setControlMode(ControlMode.SMART, ... );
mFlightController.setMaxFlightHeight(499.0f , ... );
mFlightController.setMaxFlightRadiusLimitationEnabled(false, ...);
mFlightController.setLandImmediatelyBatteryThreshold(15, ...);
mFlightController.setStateCallback(new FlightControllerState.Callback() {
            @Override
            public void onUpdate(@NonNull FlightControllerState flightControllerState) {
        //Check GPS level
    }
}
mFlightController.setHomeLocationUsingAircraftCurrentLocation( ... );



  2. Check Batter status :
getProductInstance().getBattery()
            setStateCallback(new BatteryState.Callback() {
                    @Override
                    public void onUpdate(BatteryState djiBatteryState) { ... } ;
    });

    3. initialize Mission Manager : 
mMissionManager = new WapointMissionOperator();
mMissionManager.addListener( listener );
    //LIstener does a couple calculations when reaching a waypoint. 

 4. Camera :
mCamera = getProductInstance().getCamera();
mCamera.setMode(SettingsDefinitions.CameraMode.RECORD_VIDEO, ... );
mCamera.setSystemStateCallback(new SystemState.Callback() { ... });


 5. Creating waypoint mission Builder : 
WaypointMission.Builder builder = new WaypointMission.Builder();
builder.autoFlightSpeed( value );
builder.maxFlightSpeed( value );
builder.setExitMissionOnRCSignalLostEnabled(false);
    builder.finishedAction(WaypointMissionFinishedAction.AUTO_LAND);
    builder.flightPathMode(WaypointMissionFlightPathMode.NORMAL);
    builder.gotoFirstWaypointMode(WaypointMissionGotoWaypointMode.SAFELY);
    builder.headingMode(WaypointMissionHeadingMode.USING_WAYPOINT_HEADING);
    builder.setGimbalPitchRotationEnabled(true);

 6. Creating waypoints : 
    for (int i = 0; i < waypointCount; i++) {
        dji.common.mission.waypoint.Waypoint djiwp = new dji.common.mission.waypoint.Waypoint(lat, lon, alt);
        djiwp.heading = 0; //facing true north
        djiwp.addAction(new WaypointAction(WaypointActionType.STAY, 0)); //just passby 
        builder.addWaypoint(djiwp);
    }

  7. finishing up with builder:
WaypointMission mission = builder.build();

 8. starting mission :
mMissionManager.loadMission(mission);
if (WaypointMissionState.READY_TO_RETRY_UPLOAD.equals(mMissionManager.getCurrentState())
                              ||   WaypointMissionState.READY_TO_UPLOAD.equals(mMissionManager.getCurrentState())) {

    mMissionManager.uploadMission(new CommonCallbacks.CompletionCallback() { ... } );
}
mFlightController.setHomeLocationUsingAircraftCurrentLocation( ... ); //redo just to check.
mFlightController.setConnectionFailSafeBehavior(ConnectionFailSafeBehavior.GO_HOME, ...);
mMissionManager.startMission(new CommonCallbacks.CompletionCallback() { ... });
2 Answers
Related