claudeDroneteam-docs
documentation · reference
Docs reference

Structured knowledge from collected_doc_media/claudedrone_docs/. Browse the tree on the left; the source of truth is markdown in the repo.

52 — Teaching the drone to scan before it flies

We shortened the close-range sensors and penalized blind flight so the drone learns to scan ahead with its rangefinder first, then move.

stablerl-labupdated 2026-06-16T00:00:00.000ZClaudeDroneRLDevLog

What this is: the drone already flew through all seven training rooms without crashing — but it ignored its long-range scanner and flew by feel. We changed the rules so the scanner finally became worth using, and retrained. Why it’s here: a real, careful pilot looks before moving. We wanted the drone to probe the space ahead with its scanner first, then commit — instead of groping along with its short-range bumper sensors.

Date: 16 June 2026 Machine: D2 (home box with the RTX 5070) Ticket: scan-as-skill / VL-shorten


Glossary

A few terms up front, in plain language:

  • PPO — the reinforcement-learning algorithm we train with. Think of it as a coach that watches the drone try things and nudges its instincts: “that move worked, do more of it; that one hurt, do less.” Over millions of tiny attempts, good habits stick.
  • Coverage — how much of a room the drone has visited. The goal of the whole task is to explore an indoor space thoroughly, so “coverage” is basically the score.
  • Scan — the drone turning its long-range sensor toward a spot to actually look at what’s there, like swinging a flashlight beam to check a dark corner before walking into it.
  • Skill — a useful behavior the drone has genuinely learned to rely on, not just an action it occasionally fires by accident. Our whole point here was turning “scan” from a twitch into a skill.
  • TF-Luna — the long-range laser rangefinder, mounted on a little rotating neck. Sees far (up to 6.4 m) but only where it’s currently pointed.
  • VL53 — the short-range laser sensors arranged around the drone. Always on, see in every direction, but only a short distance.
  • Blind flight — moving into an area the drone hasn’t scanned recently. It “knows” what’s close, but it’s stepping into the unknown beyond that.
  • Warm-start — continuing to train a model that already works, instead of starting from a blank slate. Much faster than learning from scratch.
  • Reward penalty — a small negative score the coach hands out for behavior we want to discourage.

1. What I wanted

The drone could already fly point-to-point across all seven training rooms without crashing. On paper, a solved task. But Aleks watched a flight back in the Player and caught something: the drone wasn’t really using its long-range scanner. It would swing the scanner around aimlessly and then fly by feel, leaning entirely on the short-range sensors.

That defeats the purpose. The whole reason for putting a steerable long-range scanner on the drone is so it can look ahead at obstacles before committing to fly there — the way a cautious human pilot glances down a corridor before stepping into it. I wanted “look, then go,” not “feel your way along and hope.”

2. What I tried

First, the diagnosis. The drone has two kinds of “eyes”:

  • Six short-range sensors (VL53) arranged in a ring. They saw out to 1.2 m in every direction, always on.
  • One long-range scanner (TF-Luna) on a rotating neck. It sees out to 6.4 m, but only in the direction it’s pointed. Anything it hasn’t swept recently, it effectively doesn’t know about.

Here’s the catch: the training rooms are small. A 1.2 m ring of always-on sensors was plenty to avoid bumping into anything. So the long-range scanner was simply redundant — and the drone, sensibly, ignored the tool it didn’t need.

Aleks picked option “B”: instead of nagging the drone to scan, make scanning genuinely necessary.

  1. Shortened the short-range sensors to 0.5 m. Now they’re a last-ditch “collision bumper,” nothing more. To know what’s coming up further ahead, the drone has to turn the scanner that way and look.
  2. Added a penalty for blind flight. Fly into a region you haven’t scanned in a while, and you take a small hit. The math now favors “scan first, then move.”
  3. Warm-started from the already-skilled model rather than training from scratch — so this went quickly.

I kept the concepts deliberately simple: shrink the crutch, tax the guesswork, let PPO rediscover the habit. (The exact numbers stay in the config; the idea is just “blind motion costs a little.”)

3. What happened

It worked, and cleanly:

  • The drone still clears all seven rooms without crashing — even though it can now only “see” half a meter up close. That’s the key result: it genuinely learned to lean on the scanner, because the short-range bumper alone is no longer enough to navigate.
  • Blind flight dropped roughly 4× — from about 31% of steps down to about 7%. The drone now almost always moves only into space it has already scanned.
  • The scanner sweeps wider and more actively — it brushes across the whole front sector ahead of itself, like a little radar.

One behavior worth noting: the drone doesn’t aim the beam precisely along its flight path. Instead it sweeps the scanner rapidly across the sector ahead (radar-style) and then moves. That’s still a valid “looked around, then went” strategy and it satisfies the goal. If we later want the beam pointed strictly along the heading, that’s a separate, smaller refinement — not something this change required.

4. Sources

Two flights were recorded for the Player so the behavior can be reviewed directly:

  • An apartment layout with doorways.
  • A hall with columns.

Both show the new sweep-then-advance pattern clearly.

5. What’s next

The current sweep-the-sector behavior is good enough that scanning is now a real skill rather than a quirk. The optional follow-up, if Aleks wants it, is tightening the scan so the beam tracks the intended heading more precisely — a directed look rather than a broad sweep. Until then, “look before you leap” is finally baked into the policy.

© 2026 claudeDrone Team · auto-pipeline · Nuxt 3 SSR