DJI SDK - Navigation mode not open while running consecutive timeline missions

Viewed 113

I am using DJI sample code to run a timeline mission.

The first time I run the mission it runs fine. However the second time I get a DJIMissionControlTimelineEventStartError - Navigation mode not open when a GoToAction is executed. This element is second in the list after TakeOffAction.

So I cannot run consecutive missions without restarting the app.

I cannot find any detail in the docs or online anywhere. How can I get the Timeline controller back to a good state after this happens?

    - (IBAction)onStartButtonClicked:(id)sender
    {
        [[DJISDKManager missionControl] addListener:self
                        toTimelineProgressWithBlock:^(DJIMissionControlTimelineEvent event, id<DJIMissionControlTimelineElement>  _Nullable element, NSError * _Nullable error, id  _Nullable info)
        {
            if (error) {
                NSLog(@"ERROR: %@", error.localizedDescription);
            }
            if (error) {
                [[DJISDKManager missionControl] stopTimeline];
                [[DJISDKManager missionControl] unscheduleEverything];
            }
        }];
        [[DJISDKManager missionControl] startTimeline];
    }

    - (IBAction)onStopButtonClicked:(id)sender
    {
        [[DJISDKManager missionControl] stopTimeline];
        [[DJISDKManager missionControl] unscheduleEverything];
        [[DJISDKManager missionControl] removeListener:self];
    }

Timeline Elements I have scheduled

  • TakeOffAction
  • GoToAction
  • GimbalAttitudeAction
  • ShootPhotoAction - newShootSinglePhotoAction
  • GimbalAttitudeAction
  • AircraftYawAction
  • ShootPhotoAction - newShootSinglePhotoAction
  • AircraftYawAction
  • ShootPhotoAction - newShootSinglePhotoAction
  • AircraftYawAction
  • ShootPhotoAction - newShootSinglePhotoAction
  • repeated to get 3 rows of photos at different gimbal pitches...
1 Answers

My experience from timeline mission is that it's crap.

You can do the same by yourselt. Just call the different functions in a state machine. Then you can debug them as well :-)

Timeline -mission is never uploaded to the drone, it runs on the phone, just as you would do it in your own code.

Related