Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeline mission crashes when pauseTimeline called during DJIGimbalAttitudeAction #366

Open
brien-crean opened this issue May 28, 2020 · 6 comments

Comments

@brien-crean
Copy link

When calling [[DJISDKManager missionControl] pauseTimeline] while a DJIGimbalAttitudeAction is running in a timeline mission, DJISDKMissionErrorDomain error 10007 is thrown. I also receive similar issues when trying to pause a mission while DJIAircraftYawAction is running.

I checked if the timeline element is pausable and true is returned.

Is there a cleaner way to pause a timeline after a DJIMissionAction has completed?

Drone: Mavic Pro, Phantom 3 Professional
SDK: 4.11.2

@dji-dev
Copy link
Contributor

dji-dev commented May 28, 2020

Agent comment from Luce Luo in Zendesk ticket #35159:

Dear Customer,

Thank you for contacting DJI.
The method pauseTimeline is the only way to pause the timeline.
Can you please try to use the latest 4.12 official sample to test it again?
https://github.com/dji-sdk/Mobile-SDK-iOS/tree/master/Sample%20Code/ObjcSampleCode/DJISdkDemo/Demo/MissionManager

If the problem still, please fill in the form with more detail.
https://formcrafts.com/a/dji-developer-feedback-en

Thanks,

Luce Luo
DJI Dev Team

@brien-crean
Copy link
Author

Thanks for the reply. The issue happens with 4.12 also.

I understand that pauseTimeline is the only way to pause a timeline mission. I am wondering what is the best way to trigger it without receiving an error?

@dji-dev
Copy link
Contributor

dji-dev commented May 29, 2020

Agent comment from Luce Luo in Zendesk ticket #35159:

Dear Brien,

Thank you for contacting DJI.
Sorry about it.
It seems a potential issue and will reprote it to engineer to confirm further.
Can you please give me more info?
-Mavic Pro firmware version
-Phantom 3 Professional firmware version

Thanks,

Luce Luo
DJI Dev Team

@brien-crean
Copy link
Author

The Phantom 3 Professional is running the last release - v1.11.20 which shows as 2.04.20.50 in DJI Go

The Mavic Pro according to DJI Go 4 is running 1.04.0500

As a workaround after a lot of testing I found that if I trigger pauseTimeline when the currently running timeline element is at the DJIMissionControlTimelineEventStarted event in the timeline listener it will pause just fine as long as the action/element running is NOT a DJIShootPhotoAction - any pause on a DJIShootPhotoAction results in a camera busy error.

If the same actions (e.g. DJIGoToAction, DJIAircraftYawAction, DJIGimbalAttitudeAction) are at the DJIMissionControlTimelineEventProgressed stage they fail with DJISDKMissionErrorDomain error 10007

sample workaround

[DJISDKManager.missionControl addListener:self toTimelineProgressWithBlock:^(DJIMissionControlTimelineEvent event, id<DJIMissionControlTimelineElement>  _Nullable element, NSError * _Nullable error, id  _Nullable info) {
    if (event == DJIMissionControlTimelineEventStarted) {
      [DJISDKManager.missionControl pauseTimeline];
    }
  }];

@dji-dev
Copy link
Contributor

dji-dev commented Jun 1, 2020

Agent comment from Luce Luo in Zendesk ticket #35159:

Dear Brien,

Thank you for contacting DJI.
Many thanks for your clarification and will update to the engineer.
And we will contact you again once any progress.

Thanks,

Luce Luo
DJI Dev Team

@dji-dev
Copy link
Contributor

dji-dev commented Jun 19, 2020

Agent comment from Luce Luo in Zendesk ticket #35159:

Dear Brien,

Thank you for contacting DJI.
Sorry for the late reply.
The engineer informs that the error "-1007" is 'DJIMissionControlTimelinePauseErrorAlreadyPaused', meaning that the mission has been paused and no need to pause again.

Also, you can try to add this logic to avoid it.
if(![DJISDKManager missionControl].isTimelinePaused){ [[DJISDKManager missionControl] pauseTimeline]; }

Thanks,

Luce Luo
DJI Dev Team

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants