Git Product home page Git Product logo

Comments (4)

JonasVautherin avatar JonasVautherin commented on July 19, 2024 1

Do I start the binary just before calling drone.connect() and shout it down after disconnecting?

Yeah that should work 👍.

Do I create up a new server process for each of them?

Yes! Just make sure that the servers listen on different ports (both for MAVSDK-Python and for MAVLink from the drone).

from mavsdk-python.

ShafSpecs avatar ShafSpecs commented on July 19, 2024

Do I start the binary just before calling drone.connect() and shout it down after disconnecting?

Yeah that should work 👍.

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

Do I create up a new server process for each of them?

Yes! Just make sure that the servers listen on different ports (both for MAVSDK-Python and for MAVLink from the drone).

What do you mean for mavlink? I get the part of mavsdk-python, we simply pass in separate ports each time I call connect defined above. But I don't understand the mavlink part

from mavsdk-python.

JonasVautherin avatar JonasVautherin commented on July 19, 2024

You would have to start mavsdk_server manually, once for each drone. Say one drone sends MAVLink to 14550 and the other one to 14551, you would run something like:

mavsdk_server -p 50051 udp://:14550
mavsdk_server -p 50052 udp://:14551

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?

from mavsdk-python.

ShafSpecs avatar ShafSpecs commented on July 19, 2024

Does that make sense?

Yes, perfectly. Thanks. That solves this issue for me.

You would have to start mavsdk_server manually, once for each drone. Say one drone sends MAVLink to 14550 and the other one to 14551, you would run something like:

mavsdk_server -p 50051 udp://:14550
mavsdk_server -p 50052 udp://:14551

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.

from mavsdk-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.