Code: github.com/PhilippMarquardt/drone-swarm
Drones That Land on a Moving Truck: Simulation, Baselines and Reinforcement Learning
I saw a video of a ground vehicle launching a swarm of drones one after another and got curious about the harder half of the problem: getting them back on board while the truck keeps driving. Launching is straightforward; catching up, aligning over a small moving cell at highway speed, and touching down without clipping a neighbor is where the control problem actually lives.
In my setup, a truck drives at 5 to 10 m/s carrying a roof rack of 18 landing cells spaced 60 cm apart. Small 0.75 kg racing-sized quadrotors launch, fly ahead in formation, get a recall signal, and land back into their assigned cells (counting as landed once the legs contact the deck within 20 cm of cell center). Everything below is in simulation; nothing has flown on real hardware yet.
Building the simulator
I built the quadrotor simulator in Isaac Lab 3.0 alongside a plain PyTorch reference backend that matches trajectories to within 1e-7 m. On a single RTX 5090 it steps at 1.5 to 2.4 million drone steps per second while modeling the physics that make moving-deck landings tricky:
- motor lag, aerodynamic drag, wind gusts, and delayed noisy sensors;
- ground effect near the roof deck and rotor downwash onto drones flying below;
- turbulent wake airflow behind and above the truck (randomized during training);
- a slightly heaving and pitching truck deck;
- a classical cascaded flight controller (position → velocity → attitude → body rates) handling low-level stabilization.
Before training any policies, I sanity-checked the physics against published benchmarks. For example, a drone passing overhead pushes the lower drone down by 9.4 cm, matching the Neural-Swarm experimental measurements.
Scripted baseline and residual RL
To have a realistic target to beat, I first wrote a classical baseline: assign free cells with the Hungarian algorithm to minimize total distance, gate descent when a neighbor is too close, and let the cascaded controller track the moving cell. With eight drones at 5 m/s it lands about 80% of the time. At 10 m/s it falls off, since the moving target is hard to hit cleanly and it spends too long waiting to commit, landing 76% of single-drone episodes on unseen scenes.
My first RL attempt tried adding small learned residual corrections on top of the scripted controller's targets. One seed did raise 10 m/s multi-drone landings from 63 to 215 out of 800 held-out scenes without extra crashes, mostly by tightening lateral alignment right before touchdown rather than improving coordination. Across four seeds, however, only two beat the baseline and one collapsed completely, so I dropped residual RL.
Eight drones at 10 m/s: scripted controller (left) vs the early residual policy (right). Both stall hovering above the moving deck for too long.
Pure RL: target points vs velocity commands
Dropping the scripted planner, I trained policies directly from simulator state (truck, deck, assigned cell, other drones) at 10 Hz while keeping the classical flight controller underneath.
Attempt 1: Target-point commands
First, the policy output a 3D target point in the truck's frame. Training straight from scratch at 2–5 m/s with random cells failed to discover landings, so I used a three-step curriculum:
- One drone, slow truck, fixed cell: solved in minutes, mainly to verify the training loop.
- One drone, random cell, 2–5 m/s: learned by first hovering over the cell, then descending from there (93–95% on practice scenes, still slightly behind the script at low speeds).
- One drone up to 10 m/s: tested once on 800 fresh scenes, averaging three independent runs against the scripted baseline (targeting ≥ +10 points in landings without > +2 points in crashes):
| Single drone, 10 m/s (800 unseen scenes) | Landed in assigned cell | Crashed |
|---|---|---|
| Scripted controller | 76.0% | 7.5% |
| Pure RL target-point (3-run mean) | 89.5% (+13.5 pp) | 8.8% |
Landings jumped substantially, but average crashes ticked up slightly (the best seed crashed less than the script while the weakest crashed noticeably more), pushing the confidence interval past my 2-point safety margin.
Target-point RL policy landing at 2 m/s: fast approach, braking over the cell, and settling cleanly.
Attempt 2: Relative velocity commands
Because target points are tied specifically to landing, I switched the action interface to deck-relative velocity commands at 10 Hz (an adapter adds the truck's velocity and feeds the cascaded controller), which also carries over to formation flight and multi-agent games.
Trained from scratch, the velocity policy initially just hovered beside the truck. A two-stage curriculum fixed it: start directly above the cell with a wide landing tolerance so the policy experiences touchdowns early, then pull starting positions back to full recall distance while tightening tolerance down to 20 cm.
I picked checkpoints by their worst-case speed on practice sets (requiring ≥ 90% in the assigned cell and ≤ 5% crashes across 2–10 m/s; two of three training runs passed), then ran a matched evaluation on 800 fresh scenes (400 per speed):
| Single drone, held-out scenes | 2 m/s | 6 m/s | 10 m/s | Crashes at 10 m/s |
|---|---|---|---|---|
| Scripted controller | 99.8% | 92.8% | 71.0% | 7.0% |
| Velocity RL, run 1 | 99.3% | 100% | 96.0% | 3.5% |
| Velocity RL, run 2 | 99.3% | 99.8% | 97.5% | 1.0% |
At 10 m/s, both velocity policies beat the scripted baseline by 25–26.5 percentage points while cutting crashes in half (or better), with most scripted failures being timeouts from hesitating over the deck.
Velocity policy at 10 m/s (chase view): closes in from behind after recall, matches deck speed, and latches ~5 cm from cell center.
5v5 Capture the Flag (Flag Raid)
Alongside truck landings, I wanted an adversarial multi-drone benchmark with no shooting or ramming, so I built a 5v5 capture-the-flag game called Flag Raid. Defenders in their own half can tag nearby attackers, sending tagged drones back to base on autopilot until a teammate frees them; flag carriers fly slower and drop the flag if tagged; first team to three captures (or most after three minutes) wins. I verified the rules with scripted teams first to make sure pure flag-camping or ramming strategies couldn't win.
Self-play scaled from 1v1 to 3v3 to a 5v5 league against current, past, and scripted opponents. Early learned policies turned into pure flag races and never tagged anyone, because my first ruleset required holding proximity for 0.5 s, which was easy for a carrier to juke out of. Switching to instant tags produced genuine back-and-forth games with interceptions, carrier tags, and rescues.
Self-play 5v5 match: Red wins 3–2 in ~47 s with 22 tags, 3 carrier tags, and multiple rescues (preview checkpoint; drones rendered at 2× scale for visibility).
The remaining issue is mid-air collisions: instant tagging encourages pursuers to fly straight into the drone they just tagged. Even after tweaking penalties, the best learned team still collided ~0.27 times per game against a frozen opponent (above my 0.20 limit, vs 0.004 for scripted teams), so I paused Flag Raid to move on to the foundation model.
Bugs caught along the way
Reviewing the simulator and evaluation scripts closely caught three nasty bugs that could have invalidated results:
- Hover-latching: a drone could register as landed up to 2 cm above the deck, even while climbing. Auditing earlier runs showed no policy or baseline actually latched while climbing and only a few percent latched in that 2 cm gap, and it's fixed for all new runs.
- Unstable rate-loop gains: under a rare random combination of fast motors and long sensor/command delays (2–4% of randomized drones), the inner rate loop oscillated and the motor mixer maxed thrust to compensate, rocketing the drone straight up at ~8 m/s (some episodes ended > 100 m high). Scaling rate gains by 0.7 eliminated it completely.
- Wrong cell counter: early on, landing in any roof cell counted as success, so one checkpoint reported 91% overall while hitting its assigned cell only 7% of the time. Fixing that (along with tightening checkpoint selection so eval sets weren't reused) kept the later numbers clean.
Failed experiments
A free-text drone foundation model
Every RL policy above solves exactly one task. The next goal was a generalist: one model that takes the front and downward camera feeds, the drone state and a typed instruction ("land on the green cell of the truck", "orbit the truck at 5 m", "fly between the two orange pillars") and outputs a 1.6-second chunk of velocity commands for the same flight controller. The long-term idea was a frontier model giving the instructions and this model flying them. It did not work, and this section is the honest account of why I stopped.
The data engine worked. I extended the simulator to 19 task families (land on a named cell, fly to, fly over, go around, pass under a gate, orbit, follow a car, follow a road, hover above, two-step tasks and more), seven procedural biomes, CC0 PBR ground materials and HDRI skies, a gimbal-stabilized front camera, and about 15,000 instruction templates, part of them paraphrased by an LLM and filtered so every instruction has exactly one valid target. Privileged experts solve 98 to 100% of episodes in almost every family. In total I generated about 27 flight-hours of training data.
A few training episodes with the per-step status label (active, done, escalate, handoff) the expert produced alongside the velocity commands.
Three attempts at the model:
| Attempt | Setup | Closed-loop result |
|---|---|---|
| GR00T N1.7, frozen vision | Fine-tuned on an earlier 6-family dataset, 2 camera frames, 18k steps | 35% mean over 6 families (gap 77%, pillar 60%, orbit 41%, move 27%, follow 5%, land 2%) |
| Cosmos-Predict2.5 world-action model | 2B video model with LoRA, actions predicted jointly with future latent frames, 15k steps | Pillar 64% (0% with grey images), orbit ~14%, land 2% with 52% crashes; 0.56 to 1 s per plan, about 10x slower than GR00T |
| GR00T N1.7, vision fine-tuned | All 19 families, 27 flight-hours, 4 frames per camera, 10k + 4k steps on one RTX PRO 6000 in a 10-hour window | Pillar 5 to 15%, gap 0%, orbit 5%, land 0% |
The last run is the instructive one. On replayed training episodes it predicted the expert's actions well (forward-speed correlation around 0.9, loss falling steadily), but flying on its own it wandered and almost never reached the named object, even when that object was in view from the first frame. Before stopping I ruled out, each with a dedicated closed-loop test:
- The evaluation pipeline: the expert's own commands, passed through exactly the path the model's outputs take, succeed 100% of the time.
- Latency, replanning rate and sampling noise: zero delay, slower replanning and fixed noise all stayed at 5%.
- Visual clutter: plain scenes without biomes were no better.
- Copying the current velocity: removing the state input or the motion history did not unlock homing.
- Image compression: training frames were video-encoded, test frames raw; encoding the test frames the same way gave 10%.
- Instruction wording and targets starting behind the drone: the train and test distributions match.
- More training: 4,000 extra steps changed nothing.
The one big change I never isolated is fine-tuning the vision encoder at a high learning rate, which may have damaged its pretrained object recognition. Both attempts that did better kept their pretrained vision frozen. The real mistake was mine: compared with the 35% baseline I changed the vision training, frame count, outputs, task count, scenes, data and evaluation script all at once, so when it failed nothing pointed to a cause. The controlled run (the working recipe on the new data, then one change at a time) would have taken a few hours and was ready when I stopped.
What I took away:
- Keep a working baseline and change one thing at a time. With seven simultaneous changes, a failure tells you nothing.
- Open-loop fit is not evidence. In both the world-model and the GR00T runs, falling loss and good action correlation sat next to near-zero closed-loop success. Run a small closed-loop test from the first checkpoint and treat it as the primary signal.
- Know who is flying. At one point a strong landing number turned out to come from a privileged expert taking over after a handoff, not from the model. I struck it, and now every number states which component produced it.
The simulator, the 19-family data engine and the evaluation pipeline remain usable; the model did not reach a level worth continuing on this budget.