Closed dingpwen closed 3 years ago
I will try WaypointV2MissionOperator tomorrow.
Hi, I have tried with WaypointV2Mission, it worked but once drone started, app crashed too.
Agent comment from William Wong in Zendesk ticket #42311:
Dear Client
Thank you for contacting DJI.
Please use WaypointV2Mission for M300RTK.
Hopefully our solution can help you. Kindly Regards, DJI Developer Support
Dear DJI: When use WaypointV2Mission , and when trying to uploadWaypointActions: __weak typeof(self) weakSelf = self; [self.missionOperator uploadWaypointActions:self.actionList withCompletion:^(NSError * _Nullable error) { if(error) { [ZQLog bLogI:[NSString stringWithFormat:@"upload mission action fail:%@", error.description]]; return errorBlock(error.description); } else { [ZQLog bLogI:@"upload actions success"]; weakSelf.missionState = BRWaypointMissionStateUploadAction; [weakSelf startWaypointMissionWithSuccess:successBlock error:errorBlock]; } }];
It tell me:Unknown Error!(code -1999)
and when i am trying to ignore action and rederect to startMissionWithCompletion :
[self.missionOperator startMissionWithCompletion:^(NSError * _Nullable error) {
if (error) {
[ZQLog bLogI:[NSString stringWithFormat:@"start mission fail with eror:%@", error.description]];
return errorBlock(error.description);
}
else {
weakSelf.isReachPoint = NO;
return successBlock();
}
}];
It also tells me: Unknown Error!(code -1999)
what‘s mean of this?
Did you update all devices and M300 to latest firmware? I used to have the same error as you until I updated latest firmware. ONLY my app crashed when I call start function, I still see my drone do mission on assistant app.
Did you update all devices and M300 to latest firmware? I used to have the same error as you until I updated latest firmware. ONLY my app crashed when I call start function, I still see my drone do mission on assistant app.
I update the firmware yestoday.
Did you update all devices and M300 to latest firmware? I used to have the same error as you until I updated latest firmware. ONLY my app crashed when I call start function, I still see my drone do mission on assistant app.
Dear sir, your sdk version is the newest?
Did you update all devices and M300 to latest firmware? I used to have the same error as you until I updated latest firmware. ONLY my app crashed when I call start function, I still see my drone do mission on assistant app.
Dear sir, your sdk version is the newest?
Yes, I'm using the latest version 4.14
@dingpwen if you need sample code for WaypointV2, I can help BUT once I call startMission function, my app crashed too.
wrong to close it!
I have WaypointV2 missions working. With different actuators, triggers, and waypoints. I still see some issues when executing several actions in the same waypoint.
My recommendation is to use all the listeners available to track the upload of the waypoints and actions successfully.
@edupazpix4d You are using Swift or Obj-C? I wrote my app in Swift, it crashed once i call startMission, BUT when i observe drone via assistant app(for Matrice), i saw it do exactly what i uploaded to mission's actions.
@Matheus193dn I'm using ObjC. By using MobileSDK 4.14-trial1 I have observed many features are not being implemented or they work as they should be.
What about the listeners? They should tell you when the mission is going to start.
@edupazpix4d Of course, i implement all listeners right after i call operator.loadmission. From DJIWaypointV2MissionExecutionEvent, the event.progress prints to console "Mission is executing" then my app crashed.
Are you doing anything else with the drone? Like live feed, camera settings?
I have experience some crashes when using some of the new functions to set up the camera.
@edupazpix4d I have done FPV with M300 here my code https://github.com/dji-sdk/Mobile-SDK-iOS/issues/413. If you are using drone (not M300), plz use older version of SDK, the others settings of camera still work fine(EV, IsoThermal, Zoom, Focus..). My app also crashed if i use new DecodeLogic & VideoAdapter in FPV (not M300).
Oh, I have seen your code before. I have live feed working with Zenmuse H20T. But there are some features not being very well supported. I opened several issues #422 #421 #417
Haha, you can try your luck in CN forum. My code for live FPV was found there but from an android guy not iOS.
After update sdk to 4.14-trial1, it always tell me: The aircraft home point is not recorded yet,(code:9039)
The true is that, I have set the home location using current location by RC.
@dingpwen you must use function of remote controller to disable RTK
@dingpwen you must use function of remote controller to disable RTK
3ks, when close RTK, and without any actions upload, my drone fly successfully. and app not crashed. I will try actions next.
@dingpwen Are you coding on Swift?
@dingpwen Are you coding on Swift?
OC
@dingpwen Are you coding on Swift?
OC
oh, i’m writting on Swift, seems i need to make a clean project to test the mission
@dingpwen Are you coding on Swift?
OC
oh, i’m writting on Swift, seems i need to make a clean project to test the mission
When I add some actions, it show me: Unkown Error!(Code:-1999) now. My codes:
-(DJIWaypointV2Trigger)reachTriger:(NSInteger)startIndex endWith:(NSInteger)endIndex{ DJIWaypointV2Trigger trigger = [[DJIWaypointV2Trigger alloc]init]; trigger.actionTriggerType = DJIWaypointV2ActionTriggerTypeReachPoint; DJIWaypointV2ReachPointTriggerParam *param = [[DJIWaypointV2ReachPointTriggerParam alloc]init]; param.startIndex = startIndex; param.waypointCountToTerminate = endIndex; trigger.reachPointTriggerParam = param; return trigger; }
-(void)addRotateAircraftAction:(NSInteger)startIndex endWith:(NSInteger)endIndex withAngle:(double)yaw{ DJIWaypointV2Action *action = [[DJIWaypointV2Action alloc]init]; action.trigger = [self reachTriger:startIndex endWith:endIndex];
action.actuator = [[DJIWaypointV2Actuator alloc]init];
action.actuator.type = DJIWaypointV2ActionActuatorTypeAircraftControl;
DJIWaypointV2AircraftControlParam *acParam = [[DJIWaypointV2AircraftControlParam alloc]init];
acParam.operationType = DJIWaypointV2ActionActuatorAircraftControlOperationTypeRotateYaw;
DJIWaypointV2AircraftControlRotateHeadingParam *hParam = [[DJIWaypointV2AircraftControlRotateHeadingParam alloc]init];
hParam.heading = yaw;
acParam.yawRotatingParam = hParam;
[self.actionList addObject:action];
}
and startIndex = 0, when called.
mission follow: load success --> upload success -> upload actions success -> start mission fail!
I don't see action.actuator.aircraftControlActuatorParam = acParam
;
I don't see
action.actuator.aircraftControlActuatorParam = acParam
;
Oh, my god!
I don't see
action.actuator.aircraftControlActuatorParam = acParam
;
When add this code, start mission with the same problem, but when i start mission again, drone fly successfully! It means some delay need when upload actions?
I don't see
action.actuator.aircraftControlActuatorParam = acParam
;
Thank you very much. I find the reason, start mission should be running in main thread!
@Matheus193dn @edupazpix4d
I really don't know how to thank you for your help, and only to say, you are all super-man!
@dingpwen 不客气
@dingpwen you're welcome
When RTK is closed, WaypointV2Mission is ok.
@dingpwen plz remember to enable it when you flight outside
So waypointMissionV2 works outside with RTK enabled?
So waypointMissionV2 works outside with RTK enabled?
Hi, i no longer work with DJI Drone, but as I remembered plz enabled(must be) it when you fly outside.
When loadMission, it tell me: This feature is not supported in the SDK(code:-1000)
My code similiar as :
(DJIMutableWaypointMission *)waypointMission { if (!_waypointMission) { _waypointMission = [[DJIMutableWaypointMission alloc] init];
} return _waypointMission; }
and then:
NSError *error = [[DJISDKManager missionControl].waypointMissionOperator loadMission:_waypointMission]; if (error) { [ZQLog bLogI:[NSString stringWithFormat:@"load mission fail:%@", error.description]]; return errorBlock(error.description); }
and some other: //接下来要飞行区域的安全点 DJIWaypoint *waypoint = [self createWaypoint:second safePoint:YES];
MY sdk: use_frameworks! pod 'DJI-SDK-iOS','~> 4.13.1' pod 'DJI-UXSDK-iOS', '~> 4.13' pod 'DJIWidget', '~> 1.6.3'