As the title suggests, I have two individual drone, each having their raspi and pixhawk flight controller, which I need to connect to my laptop. So the main issue is that, our challenge only allows single command to perform the whole task via a single GCS and I require my drones to take flight one after the other. Are there any means/method to do so in one go? I cannot figure out a method/process which, after a single command(suppose executing a python script in command line) can connect to both of my individual raspi one after the other(or simultaneously) , which in turn govern their respective flight controller for autonomous flying of the drone along with my own specific task(like human detection and payload dropping mechanism). Please suggest anything related if you know. Thank you for your time and help!
No issue connecting the multiple vehicles, just so long as each vehicle has a different MAV_SYSID parameter value.
Then you can use software like mavlink-router (GitHub - mavlink-router/mavlink-router: Route mavlink packets between endpoints) or mavp2p (GitHub - bluenviron/mavp2p: flexible and efficient Mavlink router) to route the MAVLink messages between the 2 drones and the GCS.
I can only connect the two pixhawk flight controller to my GCS via mavlink right? How would I go about connecting the raspi to my laptop(except wifi)for either controlling it or executing a file in raspi’s system via my laptop? I know its a bit off-topic from drones and pixhawk, but it would really help. Thanks a lot for your response
Wifi is one option.
Bluetooth, or a 900Mhz data radio, packet radio..
Or use a serial data connection if your data needs are modest - you can use Mavlink router on the Pi to send the MAV stream over a long range serial connection - using 433Mhz/800Mhz/etc.
Any manner in which you would build a long range wireless network
Most of those telemetry radios are nothing more than a “serial” bridge - so you can configure the Pi with an extra serial port, use the Mavlink Router to send Mavlink over that extra serial port.
Then combine the two feeds at your GCS
I’m not merging two together, but my telemetry goes via WIFI. The rover has more than one wifi radio in it, connecting - and swapping - to various access points I have around the property.
You could use a “mesh” or make it all one big flat wifi network and never have the IP address change, but instead I use OpenVPN and have the rover connect to my VPN server, and then I connect the GCS to the VPN supplied IP. As the rover moves between access points and it’s local IP changes, it maintains the connection to the OpenVPN server.
But that’s all just standard WIFI stuff with standard WIFI range and other issues.
Please take a look at cloud.ardupilot.org
It allows controlling multiple drones from one interface. It also acts as a briedge that allows you to remotely connect MissionPlanner to your FCB via DroneEngage.
Somehow I have managed to install mavlink router, but I’m not able to figure out how to use it, will you be able to help in anyway, I was trying to send a simple message from my laptop which has the tx to the raspi having rx.
But the whole process would require internet right?
Can you “dumb” it down for me, or provide any resources which help regarding this, I have installed mavlink router, had also set the port to 5760 and the adress as 127.0.0.0.1 or something like that, but I am not able to understand anything related to using this mavlink router.
I run Mavlink-Routerd
/etc/mavlink-router/main.cf has
[UartEndpoint alpha]
Device = /dev/ttyUSB0
Baud = 921600
[UdpEndpoint bravo]
Mode = Server
Address = 0.0.0.0
Port = 14550
I have a USB to TTY serial adapter at /dev/ttyUSB0 that is connected to the flight controller - at 921600 bps running MAVLink2
With this, I can connect over my TCP/IP network to the Pi with UDPCL to 14550 with Mission Planner.
While I have mulitple rovers, I haven’t taken it to your level of trying to merge the streams, but I believe your next steps are:
Build another Mavlink Router that, instead of a /dev/ttyUSB0 input is a TCP or UDPclient to your companion computer Pi. In this manner, it works like a proxy server. Mission Planner connects to the new Mavlink Router, which then connects to the companion computer Pi on the rover.
Make that work, then add a second client entry on that device and have it talk to the second rover.
Make sure the two rovers have unique IDs as indicated above.
Now you should have both MAV streams coming across.
Make that work, and you’ll likely see opportunities to make some adjustments and reduce the hops and so forth, but I’d try the “simpler” path first.
If you later wanted to NOT have WIFI to make this work, you’d replace the Mavlink connections to use a long-distance serial connection instead of UDP and TCP/IP - update your configuration points to use the additional serial ports.
(Complication when you start adding serial USB adapters - you’ll want to make sure USB adapter 1 goes to Rover 1 or Link 1, and adapter 2 to Rover 2 which means you’ll want to make sure ttyUSB0 remains ttyUSB0 via some settings on the Linux device likely related to which port you plug it into and so forth, so watch out for that problem when you get there)
You can have your own local server of DE … please check DroneEngage Installation — Ardupilot Cloud EcoSystem documentation