Programatically pause timeline mission after DJIGimbalAttitudeAction
1023 6 2020-5-27
Uploading and Loding Picture ...(0/1)
o(^-^)o
djiuser_OR8EW5uz3gSA
lvl.4

Canada
Offline

I have created a timeline mission to run a set of actions so the drone (Phantom 3 Professional) flies in a straight line while capturing photos at 2 second intervals while the camera points straight down. I want the mission to pause just after the gimbal action completes. Here are the scheduled actions:

DJITakeOffAction
DJIGoToAction (coordinate with altitude)
DJIGimbalAttitudeAction (pitch -90)
DJIShootPhotoAction (initWithPhotoCount 20, interval 2 seconds, wait NO)  
DJIGoToAction (coordinate with altitude)  


The mission runs fine but I want to pause the timeline programatically after a DJIGimbalAttitudeAction completes so I can adjust the camera settings before the last two actions are run.

Is this possible? I tried to execute this if the indexOfScheduledElement matched the index of the DJIGimbalAttitudeAction timeline element in the addListenerToTimelineProgressWithBlock of DJIMissionControl but I got a DJISDKMissionErrorDomain error 10007

On playing around with this, pausing programmatically seems to work fine if the timeline is in the middle of something like a DJIGoToAction but anything else seems to cause an error. Is there a better way to execute pauseTimeline cleanly?
Thanks
2020-5-27
Use props
Spacemarine
lvl.4
  • >>>
China
Offline

Use pauseTimeline, See Link: https://developer.dji.com/api-re ... ausetimeline_inline
2020-5-28
Use props
djiuser_OR8EW5uz3gSA
lvl.4

Canada
Offline

I am using pauseTimeline however it throws errors depending on the current DJIMissionControlTimelineEvent being received for the currently running element in the TimelineProgress listener. I found that if I trigger pauseTimeline when the currently running timeline element is DJIMissionControlTimelineEventStarted 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. Its weird, if the same actions (e.g. DJIGoToAction, DJIAircraftYawAction, DJIGimbalAttitudeAction) are at the DJIMissionControlTimelineEventProgressed stage it fails with DJISDKMissionErrorDomain error 10007


But another twist is if a DJIGoToAction element is at the DJIMissionControlTimelineEventProgressed just after the element has started to run it will fail but if I wait a couple of seconds and then pause the timeline it will work fine and not throw an error. Seems like a SDK bug
2020-5-29
Use props
Spacemarine
lvl.4
  • >>>
Hong Kong
Offline

Since P3A is too old, we don't know the bug is from P3A firmware or SDK. Maybe try the official sample first and compare to your code.
Link: https://github.com/dji-sdk/Mobil ... ionControlView.java
2020-6-1
Use props
djiuser_OR8EW5uz3gSA
lvl.4

Canada
Offline

I'm pretty sure its an SDK bug. I have tested on 4.12 and 4.11.2 as well as with a Mavic Pro, Mavic 2 Pro and Phantom 4 Pro all which have the latest available firmware for each installed. I filed a bug report with DJI
2020-6-2
Use props
DJI_Lisa
lvl.4
Hong Kong
Offline

djiuser_OR8EW5uz3gSA Posted at 6-2 09:25
I'm pretty sure its an SDK bug. I have tested on 4.12 and 4.11.2 as well as with a Mavic Pro, Mavic 2 Pro and Phantom 4 Pro all which have the latest available firmware for each installed. I filed a bug report with DJI

Did you file a bug with dev@dji.com or support@dji.com?  What's your ticket number?

-Lisa, DJI Developer Support
2020-6-2
Use props
djiuser_OR8EW5uz3gSA
lvl.4

Canada
Offline

Hi Lisa, I filed it on github - https://github.com/dji-sdk/Mobile-SDK-iOS/issues/366 (Zendesk ticket #35159) and Luce mentioned an engineer would be contacted. Should I also email dev@dji.com or support@dji.com?
2020-6-2
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules