DJI Cloud API cannot upload and execute Mission
127 0 3-28 02:47
Uploading and Loding Picture ...(0/1)
o(^-^)o
baymax.gr
lvl.2
Flight distance : 9793 ft
Singapore
Offline

Hi,
I am not able to perform executing of a mission via MQTT topics on DJI Dock.

After sending issuing a mission via the MQTT topic using flighttask_prepare  on the topic thing/product/{gateway_sn}/services, and then sending execute a mission via flight_task_execute method,

i get an error for illegal argument when Cloud API is handling flighttask_resource_get message.

I had tried upload a kmz file via the sample frontend provided by DJI but could not upload a .kmz file as it says that it is not valid format.




After investigating the code implementation, it seems like flight plans for file upload is looking for a waylines file despite it using a "FILE_DIR_SECOND_TEMPLATE" reference which points to looking for a template.kml instead of waylines.wpml  
From WaylineFileServiceImpl.java:                       boolean isWaylines = (KmzFileProperties.FILE_DIR_FIRST + "/" + KmzFileProperties.FILE_DIR_SECOND_TEMPLATE).equals(nextEntry.getName());
Additionally, it also looks for a templateType tag in XML without it being documented in
waylines.wpml

After fixing this, I also had to fix OSS configuration and it seems like upload of mission works from the frontend and could start flight plan using the job id from the frontend, but i still cannot upload mission via flighttask_prepare on MQTT.

Other than issues faced above, I have some questions:
1. Are there any requirements for the kmz file download link, other than the format specified in WPML and needing to match the md5 hash? Tried Google Drive download link but does not work, only S3 works ( tested both using curl command can download)
2. What is the purpose of
flighttask_resource_get method? does the dock download the file directly? or file download on cloudapi and transfer to dock?
3. What is the purpose of OSS Configuration? is this for temporary storage when issuing flight plan and dock will download from OSS when execute?
4. What is the recommended working way to upload a mission, so that
flight_task_execute can work via MQTT for both mission upload and execution?
5. When there are issues, such as File not found or issues downloading the mission file, is it possible to troubleshoot via a MQTT topic?



3-28 02:47
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules