-
Notifications
You must be signed in to change notification settings - Fork 42
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
Mission files cannot be sent over serial #106
Comments
Could this be related to #23? Unfortunately I never had time to look into it myself, but there is a pretty big discussion there that I believe could help 👍 |
@JonasVautherin I do not think so. My Android app is running on an Android tablet, and connecting with the drone using serial communication via a telemetry radio connected by USB cable to the tablet. Commands like arm, disarm, start mission (so the drone starts doing the mission that has already been pre-loaded onto the drone using e.g. mission planner), or getting telemetry information are all working perfectly fine and in real time. It is just this command "uploadGeneratedRawMission that is not working, when we try and use it to upload the json file with the mission for the drone. |
PS- I could provide the code that we are using to upload the mission file if that helps? |
How does it fail? Is it a timeout? |
What is the exception you get in |
I can just share our code for this with you: ` List<MissionRaw.MissionItem> missionItems = new ArrayList<>();
|
.doOnError(throwable -> {
Log.d(TAG,"Failed upload.");
})
|
Hi @JonasVautherin so we did check the error ( I'm working with @jankrystianserafim ). It's a MissionRawException: INVALID_ARGUMENT. We tested the unhandled version and you can see it below.
It appears however when everything is the same except the Mavserver is started on Android (v.1.1.1). Once again, connected via serial to the drone, with a physical phone. The only difference seems to be the Mavserver in-app vs on pc. All other commands (connect, arm, etc) still work however. I wondered if mission size had an effect, but with 2 items, the upload still fails, yet it works when mavserver is on PC. Here's the unhandled error:
|
Which version of mavsdk_server are you running in Android? InvalidArgument is sent from this file, I would say: https://github.com/mavlink/MAVSDK/blob/main/src/mavsdk/plugins/mission_raw/mission_raw_impl.cpp. Maybe you can try to debug it there to see precisely why mavsdk_server complains about your arguments? |
mavsdk_server and mavsdk versions are both 1.1.1 How can I try and debug it there? |
@JonasVautherin Quick question. When I generate a .plan file using the desktop version of QGC, then open it in a text editor (e.g. Notepad), and I copy and paste the text from the .plan file into a string array in Java, is that a missionraw file? In other words, is a .plan file generated by QGC = missionraw file ? |
You can try to run |
So we've already tried running mavskd_server on my laptop and connecting our Android app to it (we just say in the app that the system is at the IP address of the laptop). I will also add some debug outputs. |
And can you reproduce the issue with this setup? |
Yes, exactly the same issue. I also discussed this issue with Julian (@julianoes), and we both think that it may be something to do with the import_qgroundcontrol_mission() function https://mavsdk.mavlink.io/main/en/cpp/api_reference/classmavsdk_1_1_mission_raw.html#classmavsdk_1_1_mission_raw_1a43345b21cf9dedf594f62ec7ad963ce8 . If you want I can share with you the repository on Github that I have prepared for debugging this issue? We are working there with Julian. |
Good afternoon ,
Hopefully you guys can help me a bit with this problem:)
In my Android app, I am using the mavsdk command to upload a mission file (for example a .plan file that is being stored inside my app as a json file).
This command is working perfectly well (the mission file is being uploaded to the drone successfully) when I am connecting my telemetry radio to my laptop and using the mavsdkserver version that I am running from command line (using this command: mavsdk_server_win32.exe serial://COM14:115200) and telling my Android app that mavsdkserver is at the IP address of my laptop.
But then the exact same command and the exact same code is not working (upload failed - the drone does not successfully receive the mission file) when I am connecting my telemetry radio to my Android tablet instead of my laptop and using the mavsdkserver versionn that is provided by mavsdk in the Android app (in the gradle files, as io.mavsdk:mavsdk-server:1.1.1).
Do you have any idea what is causing the problem here? Is the version of mavsdkserver used by Android app's different than mavsdk_server_win32.exe? Does the mavsdkserver version for Android not yet support uploading mission files?
Thanks!
The text was updated successfully, but these errors were encountered: