Comments (4)
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.
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.
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.
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)
- Update to RTK to use base64, and update example HOT 7
- 'System' object has no attribute 'channel',The gripper does not work properly. HOT 21
- get_entries() gets stuck HOT 8
- Error when trying to connect via serial HOT 4
- Manual control/offboard not working HOT 17
- goto_location() unsupported error HOT 3
- How to use Param_server and Action_server HOT 5
- health.is_global_position_ok with Ardupilot HOT 18
- handling ActionError HOT 2
- getting mavsdk version HOT 5
- RuntimeError: aclose(): asynchronous generator is already running
- System.connect with time out HOT 3
- How to manual control
- Unable to start a mission a second time HOT 3
- How to detect offboard command completion HOT 3
- One `mavsdk_server`, multiple drones HOT 2
- install mavsdk on py zero HOT 6
- "import_qgroundcontrol_mission_from_string" function not parsing the altitude correctly HOT 1
- drone.info.get_version() INFORMATION_NOT_RECEIVED_YET HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mavsdk-python.