All the work below is done with the objective of finally being able to fly multiple MAVs/UAVs all in autonomous mode communicating with one another to achieve meaningful goals (Like quickly scan a particular area for identifying a target etc). The "Human pilot" flying in manual mode is optionally kept in the loop. Everything below is open source, so feel free to use/modify/extend :)
I am not sure if anyone else here in the community is working on carrying out such cooperative missions(like Leader-Follower, Orbit follower, Cyclic Pursuit etc) although theoretical work on it has been around for a while in many research papers. If nobody has worked on it yet, here is a fresh start, else, do comment below about your projects.
Currently, what we have here is a HIL simulator for these cooperative missions for 3 MAVs and we wish to now implement these in flight.
A framework for Hardware in Loop Simulation (HILS) of cooperative missions in autonomous miniature aerial vehicles (MAV) using open source Ardupilot-Mega based hardware and software platform has been implemented. Ardupilot Mega (APM) is an Arduino based commercial autopilot board for stabilization and navigation of individual MAVs. Our framework extends its features to support HILS of cooperative missions for multiple MAVs by facilitating inter-aircraft and aircraft-ground station communication.
The framework has a loosely coupled design which isolates the high level planning algorithms from the rapidly evolving low level autopilot routines. It is designed as a natural extension to the various flight modes (Manual/Return-to-Launch/Circle/Waypoint navigation) already present in Ardupilot-Mega platform and can be switched between them seamlessly. Cooperative mission mode is triggered through switching to "Guided Mode".
Inter-aircraft communication is done using Xbee API protocol which facilitates unicasting custom message packets to-and-from any aircraft of the cooperative system. The Xbees are also used by all the aircrafts in the HILS to communicate with the QGroundControl Station (qGCS) using the widely compatible MAVlink protocol. This makes the framework compatible with any other GCS supporting MAVlink protocol.
Since all the communication between various nodes of simulation is through Xbees in API mode, it makes the framework readily extendable for flight testing of the cooperative algorithms in real flights. The hardware in this HIL simulation comprises of the APM autopilot controller board and Xbee modules in API mode. The APM board runs both the low level autopilot software and the high-level cooperative algorithms. Xbees perform the inter-aircraft and aircraft-GCS communication. The sensors and actuators are being simulated in this HILS framework. Open source flight simulation software Flightgear is used to simulate the flight dynamics. The sensor/actuator information is exchanged
between the autopilot board and Flightgear over a serial port.
In short :
GCS used : Qgroundcontrol GCS
Autopilot Used : APM 1.4 (without Oilpan)
Communication modules : Xbee Pro in API mode on all aircrafts and GCS
Inter Aircraft communication : In Xbee API protocol
Aircraft GCS communication : MAVlink v0.9 embedded in Xbee API header and Footer
Flight Simulator Used : Flight gear, Aircraft used : Rascal 110 and C172p (JSBsim)
No. of MAVs in the cooperative mission simulated : Upto 3 till now, can be easily extended to more.
Cooperative missions performed up untill now : Leader follower for 3 MAVs, Orbit Follower for 3 MAVs, Cyclic Pursuit for 3 MAVs
Here are a few snaps of qGCS during various cooperative mission HIL simulations:
Leader Follower for 3 MAVs:
MAV1 : Autonomus Waypoint Navigation mode
MAV2 : Continuously follows MAV1
MAV3 : Continuously follows MAV1
View from another angle of the same mission.
Orbit Follower for 3 MAVs
The orbit center(lat,long,alt) can be set for any of the 3 MAVs through clicking on APM Missionplanner "Fly to Here" option which sets it as the orbit center for that MAV and also sends this orbit center information to rest of the MAVs in the simulation with then accept it as there orbit center information. Thus all the aircrafts immediately start to converge into orbits around that center.
Another angle of view for the same simulation.
The major part of APM firmware is kept essentially the same, except for a few additions. This flowchart below explains what we have tried to do :
Since we were using APM1.4 without the Oilpan, we started with the firmware provided by ardupilotdev ArduPlane_228xp2.zip and made all the additions/changes in it. We are in an effort to port everything to the latest APM firmware so that we can test the setup in flight. We also have to shift from the old MAVlink 0.9 to MAVlink 1.0.
Here are the required codes for the leader follower mission (Edit it using Arduino 0022 relax patch)
I seem to have exceeded a space limit of some kind(can't seem to attach anymore files!), I'll attach the codes as comments below.
This work was carried out by the combined effort of Swaroop Hangal and Bharat Tak under the guidance of Dr. Hemendra Arya.
Comments
I want to what add-on can be done to the cooperative missions to make it better?
I have confirmed that the XBEE-modules on the Quads actually form a mesh-network.
Without a "middle man" packets were not received by a base station (Qgroundcontrol). With it some packets were still lost, but connection was established (heartbeats received).
This is kind of an old thread, but I'm posting anyways, maybe this may be of help to someone.
I sucessfully connected two Arducopters (firmware 2.8.1 and 2.9.1) over Zigbee (not in API mode) to Qgroundcontrol:
I use the standard XBEE PRO S1, that came when we ordered from jdrones.
I think the crucial part was updating the firmware on the XBEE-adapters to XBP24-DM with X-CTU, this firmware uses a proprietary protocol by digi (DigiMesh) which seems to get the job done.
I sometimes loose connection to the UAVs, this seems to be less bad when I set the "mobile" adapters' Destination address to my "base" adapter.
As far as I understand, this will automatically create the mesh network suggested by "Chris Card", but I have not yet tested this (might do so tomorrow).
This solution has the clear advantage that one doesn't need to mess with the firmware on the Copters.
I hope this information may be of use for someone...
It should be very easy to achieve a simple 'follow the leader"
I put set mission planer to export NMEA from my Xbee telemetry (Bixler) to a serial port (henceforth "export port"). I set my quad to Follow Me and set the serial port to MP export port. The NMEA is converted into dynamic waypoints for the quad and the quad follows the plane. That's how it should theoretically work, but not tested... I am waiting for my quad parts to arrive.
Some really great work here. @Chris, nice idea about the relay!
Very good!
I have wondered about how one might achieve a 'follow the leader' type of flight mode.
I've thought about placing a bluetooth GPS, in a regular foam airplane (no APM) and use that as the location source for the follow me mode with mission planner... Since I have yet to actually try the follow me mode that is as far as I have taken this thought.
Re: X-bees in API mode.. Would using the Digi-mesh (DM vs. DP) firmware not work better for multiple units of the same wireless network.?
I'm thinking of situations where one of the MAV's might be out of range from the GCS , and the packets would the be relayed through one of the other radios that is in direct contact with the GCS .
Hey man, I am working on exactly the same target... using coordinated air vehicles for easy disaster management. Perhaps we could work together?
Impressive!