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

mission download on the server side #2340

Open
heiheiheihhhhh opened this issue Jun 14, 2024 · 13 comments
Open

mission download on the server side #2340

heiheiheihhhhh opened this issue Jun 14, 2024 · 13 comments
Labels

Comments

@heiheiheihhhhh
Copy link

Hi,If I am not directly connected to PX4 or AUTOPILOT, does the mission download on the server side have an interface?

@julianoes
Copy link
Collaborator

I don't understand what you mea. Can you give a bit more context about your setup and what you're trying to do?

@heiheiheihhhhh
Copy link
Author

我不明白你在说什么。您能提供更多有关您的设置和您正在尝试做的事情的背景信息吗?

I am using the v1.4 MAVSDK to develop my own flight control system and want to implement the functionality of downloading flight paths from the aircraft to the APP. I have found the mission_download interface in the mission module, but I am unsure how to implement the transmission of the flight path to the APP on the server side. Do you know how to implement this?

@julianoes
Copy link
Collaborator

Aha, so on the server (so autopilot side) you need to use the MissionRawServer API.

We call upload from ground station to autopilot, by the way.

Also, if you use server plugins, make sure to use MAVSDK v2. Server plugins were not well supported with MAVSDK v1.4.

@heiheiheihhhhh
Copy link
Author

Aha, so on the server (so autopilot side) you need to use the MissionRawServer API.

We call upload from ground station to autopilot, by the way.

Also, if you use server plugins, make sure to use MAVSDK v2. Server plugins were not well supported with MAVSDK v1.4.

Thank you for your reply. The situation is that I can currently implement the flight paths upload from the ground station to autopilot. I want to implement the flight paths download from the autopilot to the ground station and have found the mission_download API in the mission plugin, but I am not sure how to provide the flight paths to the ground station.

@julianoes
Copy link
Collaborator

Plugins used on the autopilot side are called _server. So that's what you want to use on that side, generally.

@heiheiheihhhhh
Copy link
Author

Plugins used on the autopilot side are called . So that's what you want to use on that side, generally._server

But there is no download_mission API in mission_raw_server plugin.

@julianoes
Copy link
Collaborator

No, the way it works is that the client (e.g. a ground station) does the upload or download. The server just responds and does the transfer.

@heiheiheihhhhh
Copy link
Author

No, the way it works is that the client (e.g. a ground station) does the upload or download. The server just responds and does the transfer.

I have tried using the mission_download API of the mission plugin on the client side, but it returned an empty MissionPlan.

@julianoes
Copy link
Collaborator

So there was no mission saved? Sorry, it's difficult to understand what is going on. You might have to share a code snippet or reproducible example.

@heiheiheihhhhh
Copy link
Author

So there was no mission saved? Sorry, it's difficult to understand what is going on. You might have to share a code snippet or reproducible example.

I apologize for the delayed response. I have reviewed the MAVLink official website regarding the download sequence diagram and found that in MAVSDK, there is only the send of MISSION_REQUEST_LIST, with no subscribe. In other words, MAVSDK indeed lacks the communication for download on the server side. Therefore, I have added a class called DownloadServerWorkItem to the mavlink_mission_transfer framework to solve this problem.
download
transfer

@julianoes
Copy link
Collaborator

I think you're misunderstanding this. The server doesn't initiate or do a mission download. It only "serves". If you want to download a mission, you would use the mission_raw plugin.

@heiheiheihhhhh
Copy link
Author

I think you're misunderstanding this. The server doesn't initiate or do a mission download. It only "serves". If you want to download a mission, you would use the mission_raw plugin.

I have tried to directly call mission_upload and mission_download in the mission plugin, but I did not obtain the MissionPlan. Below are parts of my source code and the results of execution.
run
server
client

@julianoes
Copy link
Collaborator

Ok, that would be a bug. Can you share code for me to reproduce and also mention PX4 or ArduPilot version that you're using this against?

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

No branches or pull requests

2 participants