-
Notifications
You must be signed in to change notification settings - Fork 221
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
Running mavsdk server on Windows #678
Comments
Yeah that should work 👍.
Yes! Just make sure that the servers listen on different ports (both for MAVSDK-Python and for MAVLink from the drone). |
async def connect():
# start up mavsdk on a port - 50051
System.connect() # passing in the mavsdk server details
async def disconnect():
drone.disconnect()
# shut down mavsdk process
What do you mean for mavlink? I get the part of mavsdk-python, we simply pass in separate ports each time I call |
You would have to start
Then from python you would do something like: drone1 = System(mavsdk_server_address="127.0.0.1", port=14551)
await drone1.connect()
drone2 = System(mavsdk_server_address="127.0.0.1", port=14552)
await drone2.connect() So that drone1 connects to mavsdk_server on 14551 which listens for MAVLink on 14550, and drone2 connects to the other mavsdk_server on 14552 which listens for MAVLink on 14551. Does that make sense? |
Yes, perfectly. Thanks. That solves this issue for me.
On another note, if I am using serial, that just means different ports. Except a serial is configured to connect to more than one simultaneously, in that case you pass the same serial port but run mavsdk on different ports, right? Not part of the query, but do you please have any resource for fleet management (more than one drone)? Being able to communicate amongst themselves as well as with the GCS. |
Hello, regarding using Windows with Mavsdk-python: I am using a separate mavsdk server binary (that I boot up before connecting) due to the absence of the binaries on mavsdk-python-windows-edition, I wanted to ask about startup and shutdown - what's the correct way to actually handle the server? Do I start the binary just before calling
drone.connect()
and shout it down after disconnecting?And what of a case where I have multiple connections? Do I create up a new server process for each of them? Or just using one executable is fine. Thank you
The text was updated successfully, but these errors were encountered: