Overview #
I’m on the software side of UBC Rover (UBC Snowbots). This page covers my four rover projects:
- LearnFlake typing. Getting the rover2026 competition arm to type a code on a keypad, from MuJoCo experiments in 2025 through an Isaac Lab policy in 2026.
- Fly brain. Using the wiring of a real fruit-fly brain as the controller for the team’s dev arm in Isaac Lab.
- Argetlam. Driving the real dev arm from hand tracking and voice through an Isaac Sim twin, with a Muse headband on the gripper.
- Gesture recognition and Follow! Spotting the astronaut’s Follow! gesture from the rover camera for the URC autonomy mission.
1. LearnFlake typing (Oct 2025 - Nov 2026) #
The arm task we were working toward for URC is typing a code on a keypad. We didn’t make it into the competition, so none of this has been tested at URC. It took a few rounds to get anything that worked: a year of MuJoCo and RoboSuite experiments in the team’s LearnFlake repo that never produced a policy I’d trust, and then an Isaac Lab rewrite in Sep 2026 that types full codes in sim.
The arm #
rover2026 is the competition arm, a 6-DOF arm exported from the team’s SolidWorks assembly. From the URDF it weighs about 7.00 kg (a CAD estimate) and reaches 1.18 m from the shoulder. Two things about that export cost me time:
- The URDF has
effort=0andvelocity=0on every joint, so there’s no motor data at all. Every speed and acceleration limit I trained with is a placeholder. - The exporter wrote the last joint (wrist roll) with equal lower and upper limits, so Isaac imported it as a locked joint. Every Isaac run before v3 had the wrist roll frozen until I wrote a script that rebuilds the URDF with that joint unlocked.
For pressing keys in sim I gave it a temporary presser: a 6 mm by 60 mm rod with an 8 mm ball on the end, which puts the tip 72 mm out from the last link.
MuJoCo and RoboSuite (Oct 2025 - Mar 2026) #
My first LearnFlake commit (Oct 26, 2025) was the Docker setup, and by Feb 2026 it also ran on Windows under WSL2. From Jan to Feb 2026 I wrote SB3 PPO and SAC trainers around a Gymnasium wrapper of RoboSuite’s Lift task with our arm loaded. The checkpoints ran, but the behaviour wasn’t good enough to call a success, and I never logged a success rate for them. On Mar 2 I added step-by-step parquet logging so teleop sessions could become demonstrations. The session I kept has 2,850 rows over about 101 s, with no rows flagged as a success, and there’s no trained imitation policy from this phase with a result I can point to.
In March I moved to keypad tasks directly. I added rlkit to the repo and wrote reach, keypad and keypad-lift environments for the arm on top of RoboSuite (Mar 15). I called this layer Alpha. It uses RoboSuite’s operational-space pose controller at 20 Hz with 60-step episodes, and a press counts if the tip is within 12 mm of the key in xy and 2 cm in z after hovering 3 cm above it.
The reach policy got somewhere. Its logged run is short (6,280 environment steps of SAC) and ends with 40% of evaluation episodes finishing at the target, though 20% of them started inside the tolerance already. The keypad runs went worse. On Mar 15 I ran about ten short probes with different setups (hover only, hover plus press, a residual on a scripted motion, a residual on a behaviour-cloned motion), each a few hundred steps, and only the residual on behaviour cloning finished any evaluation episode on success.
By Mar 22 I’d pulled the decision logic out into a small package, RLKB. It keeps the Gymnasium env layer (task and reward) apart from the agents and the runner that schedules rollouts and training, and a mock keyboard env lets the logic run on any laptop without RoboSuite or ROS. The piece I still like is Omega, the key-press decider. It takes a code as a digit string, maps each digit to a key and its 3D position, then steps through move, press, verify and retry before moving on to the next digit. Verification was mocked, so these runs only exercise the state machine.
The plan was a hierarchy: Alpha gets the tool over the right key, Omega handles the press sequence. My commit on Mar 22 says it plainly: the minimal HRL trial “doesn’t work well enough yet”. When I tried to rerun it later, the policy didn’t even load cleanly, because the saved policy expected an 18-dimensional observation and the env by then produced 21. On Mar 29 I also wrote an exporter that renders the sim keypad into a YOLOv8 dataset (500 images by default, one class per digit key), but the bridge back to the policy still returned the simulator’s exact key position, so perception never entered the loop.
After this, teammates rewrote the MuJoCo typing stack from scratch with DAgger and then residual RL on top of IK, and got it to 429 of 435 key presses across all 87 keys of a full keyboard in sim. That result is theirs.
Measuring it honestly #
Before starting over in Isaac, I wrote an internal memo (Sep 26, 2026) because two arm results were circulating with very different headlines. An older hierarchical SAC result from the LearnFlake work was being quoted at about 99.7% “success”. When I traced it through the code, the policy turned out to be getting the cube’s exact ground-truth position every step, and the task was cube lifting. The keypad never came into it. Nothing in the code computed a success rate at all, and the camera view in that eval was drawn on screen but never fed to the policy.
The memo proposed one shared protocol: the same keypad task, per-episode pass/fail at a fixed tolerance, reported over N randomized trials, and an explicit statement of whether the target position comes from the simulator or from perception. I’ve tried to follow that for everything below.
Isaac Lab v1 and v2 (Sep 2026) #
I rebuilt the task in Isaac Lab and trained the first version on a rented A100 on RunPod: a PPO reach policy over 1,024 parallel envs for 300 iterations, about 6 minutes. 93% of envs ended within 5 cm of the target key, but only 2.8% within 2 cm, which is the number that matters for pressing a 16 mm key. Isaac ran at about 21k env steps per second, against roughly 240 in the old RoboSuite setup.
v1 had bugs hiding in it. The keypad sat about 83 cm up instead of at table height, and the wrist roll was the locked joint from the URDF export. On top of that, stiff joint gains (800/40) made some envs go NaN, so v2 retuned them to 150/25 with a 60 N·m effort limit.
After v1 I moved training to my own machine, a VM with an RTX 5080 (16 GB). Isaac Sim 5.x segfaulted on NVIDIA driver 595, so I installed Isaac Sim 6.0.1 with Isaac Lab 3.0, which booted on Sep 28. Isaac Lab 3.0 loads the task config before Kit starts, so I had to split the env config out of the env file to stop a free(): invalid pointer crash. After that I didn’t need RunPod again.
v3: one press #
v3 trained a single press: an IK step towards the key plus a learned residual, 1,500 iterations. Over 1,000 test episodes:
| IK + RL residual | IK only | |
|---|---|---|
| Successful press | 93.0% | 10.1% |
| Ended in the wrong spot | 7.0% | 54.6% |
| Median time to press | 0.18 s | 1.02 s |
| Median xy error at press | 0.4 mm | 2.03 mm |
Per-key success ran from 89.1% to 96.9%. It looked good, but the arm teleported back to the start pose after every press, and the policy had learned 0.18 s lunges at the key. That’s useless on a real arm.
v4: a whole code per episode #
v4 fixes that by making an episode one full 6-digit code with no reset between digits. The tip has to lift 12 mm before the next digit counts, so it can’t just hammer the same spot.
flowchart LR CODE["Next digit
key position from sim"] --> IK["Damped least-squares IK step
0.25 m/s free, 0.04 m/s near the key"] OBS["41-D observation"] --> POL["PPO policy
[256, 128, 64]"] POL -- "6-D joint residual" --> SUM(("+")) IK --> SUM SUM --> LIM["Speed + acceleration limiter
anti-windup band"] LIM --> SIM["Isaac Lab
2,048 envs, 120 Hz physics"] SIM --> OBS SIM --> CHECK["Press check
6 mm xy, 2-5 mm deep, under 0.10 m/s"] CHECK --> CODE
- Control. Physics runs at 120 Hz and the policy at 60 Hz. Each step, a damped least-squares IK step moves the tip towards the key, capped at 0.25 m/s in free space and 0.04 m/s within 3 cm of the key. The policy adds a 6-D joint residual scaled by the same cap, and the joint targets go through a speed and acceleration limiter.
- Observation. 41 numbers: joint positions and velocities, tip-to-goal and tip-to-key vectors, the tool axis, the IK step, the previous action, the commanded velocity, and two task flags (whether a lift is needed, and how many digits are left).
- Press rule. A digit counts when the tip is within 6 mm of the key centre in xy, 2 to 5 mm below the key top, and moving slower than 0.10 m/s. An episode ends early on a press in the wrong spot, a slam (moving down faster than 0.25 m/s), an overpress (deeper than 5 mm) or a timeout after 20 s.
- Reward. Potential-based progress shaping, +30 per digit, +50 for the full code, -15 on failure, plus small costs on time, action size, acceleration and tip speed.
- Randomization. The keypad moves up to 3 cm in xy per env, and joints start with up to 0.08 rad of noise.
It took several failed runs to get the reward right. The first full v4 run typed 0.0% of codes: 92.7% of episodes ended in an overpress and it averaged 0.92 digits. Between that and the final run I learned four things:
- An unscaled residual drowned out the IK’s braking, so no press ever happened.
- All-negative shaping taught “press once, then overpress to end the episode”.
- All-positive shaping taught “hover forever”.
- The digit bonus has to outweigh the chance of failing times the failure penalty.
The final run trained for 2,500 iterations on 2,048 envs in about 21 minutes on the RTX 5080. Over 1,000 episodes, each typing one random 6-digit code (seed 123):
| IK + RL residual | IK only | |
|---|---|---|
| Full 6-digit code typed | 99.2% | 22.0% |
| Digits per episode (mean) | 5.95 | 2.55 |
| Ended in the wrong spot | 0.8% | 57.4% |
| Ended by overpress | 0% | 20.6% |
| Median time per digit | 0.71 s | 1.89 s |
| Press xy error, median / p90 | 0.935 / 1.801 mm | 0.1 / 2.737 mm |
When I moved the code into LearnFlake2 I re-ran the shipped model from the new repo, and it typed 99.0% of 100 codes.
That 99.2% is a statement about this simulated arm, and I want to be clear about what it leaves out:
- The speed and acceleration limits are placeholders, since the URDF has no motor data. The policy stays under the speed limits, but at p99 joint 2 peaked at 2.2 rad/s² against a 2.0 limit, which is PD overshoot on top of the command.
- The policy reads the key position straight from the simulator. There’s no camera in the loop yet.
- The keys are visual only. The table is the only collider, so press depth is measured geometrically and there’s no modelled key switch.
- It has never run on the real rover2026 arm.
The code is public in LearnFlake2 under auto_press_key/. The key layout carried over from my LearnFlake HRL work, and so did the reward ideas, mainly the gentle-press rule and progress shaping with a digit bonus.
Next for typing: real motor and gearbox limits put into the env and the URDF, then a retrain. After that, the sim needs actuator and sensor modelling with wider randomization, and the policy needs a keypad pose from vision in place of the simulator’s.
2. Fly brain (Nov 2026, in progress) #
This one started as a question: can the real wiring of a fruit fly’s brain control a robot arm? FlyWire mapped the whole adult fly brain from electron microscope images (v783, 138,639 neurons). I took that wiring and used it as the controller for UBC Rover’s dev arm in Isaac Lab, a 6-joint arm with a two-finger gripper, and trained it to pick up a 5 cm block. Only the wiring is real fly. The neurons are simplified and the layers that feed sensors in and read commands out are learned. A real fly doesn’t grasp anything either, so this borrows its wiring as a controller.
The fly brain now has its own page with every robot, gripper and control experiment: Fly Brain Robot.
How the brain is wired in #
- The graph. I keep the neurons within two synapses of the senses, about 10.3k neurons and 187k edges. Edges follow FlyWire wherever two neurons share at least 5 synapses. Each edge’s sign comes from the presynaptic neuron’s neurotransmitter, and its starting strength from the synapse count. The recurrent core is ported from FLYNN (MIT licence).
- Inputs. Joint sensors write into 1,375 leg sensory and Johnston’s organ neurons, and finger contact into 305 bristle neurons. What the arm sees goes into 4,022 LC/LPLC visual projection neurons, the fly’s own channels for small objects and looming.
- Outputs. The 1,299 descending neurons, which a real fly uses to move its body, are read out into commands for the 6 joints and the gripper.
- Training. DAgger from a scripted teacher that always picks the block up. The brain drives, the teacher labels what it should have done, and the brain learns from that. PPO on top made a 100% brain worse (90%), so I kept the imitation-trained one.
Most runs trained on my RTX 5080 through a small GPU job queue, plus one overnight batch on two rented AWS GPUs. One RunPod job, training a frozen camera brain with the nerve cord attached, lifted that setup from 29% to 58.6% for $3.65. Every training run and eval ends with a recorded episode in the monitor above, so I can watch what a number actually looks like.
Results so far #
All in simulation, on the plain pick task unless noted:
| Setup | Success |
|---|---|
| Block position given directly, connectome brain | 100%, in 13 min of training (an MLP got there in 7) |
| Real synapse counts and 20 ms neuron timing | 100% |
| Spiking neurons (the Shiu et al. 2024 model) | 0%, the signal didn’t survive as spikes |
| Adding the fly’s nerve cord (MANC) between brain and arm | 100% best, 87% at the end of training |
| Camera only, through a 32 px hexagonal retina into the visual neurons | 99.6% to 100% over 3 training seeds, 256 episodes each |
| Camera through the frozen flyvis optic lobe (about 45k neurons) | 100% best, 99% final |
| Full chain: camera, flyvis optic lobe, spiking FlyWire brain, MANC, arm | 68.8% best over 128 episodes, and unstable (later evals 13% to 64%) |
The camera brain fine-tuned to a simulated Franka arm went from 0% to 99.6% in 11 minutes.
Does the real wiring matter? #
So far, mostly no, and I’ve tried to test that properly. On the state-input pick I trained 24 policies over 3 paired seeds, and real FlyWire wiring came out 0.0 points ahead of the same neurons rewired with cell types kept. Every brain hit about 100%, including the MLP, so the task can’t show a difference.
For the camera version I wrote the test plan before any results came in. An earlier single-seed run had hinted that the fly brain beat an MLP on an oversized 8 cm block (93% against 26%). The rule was to drop that claim unless the connectome beat the MLP by at least 20 points in 2 of 3 seeds. Every brain scored about 0% on the 8 cm block, so the claim is dead. There is one lead worth following. On a smaller 4 cm block the connectome beat the MLP by 49.0 points on average, and a random graph with the same degrees did much worse. A rewire that keeps cell types did about as well as the real wiring, though, which points at the cell-type structure more than individual connections. Two of those runs are still missing a third seed.
Lesions #
Lesions are where the fly wiring gets interesting, because you can cut parts of it the way you would in a real fly. On the camera brain (128 episodes per test, 94% intact):
- Silencing the 65 descending neurons with the largest readout weights dropped success to 2%. Silencing 65 random ones left it at 88%.
- Cutting every GABA output dropped it to 9% and raised high-frequency tremor from 5% to 25% of joint-velocity power. Cutting the same number of acetylcholine outputs dropped it to 2% with no tremor.
The two halves of the brain also turned out to do different jobs. With the right-side LC/LPLC visual neurons off, the arm swings 25 to 32 cm to the right whichever side the block is on. With the left side off, it still follows the block sideways but stops about 6 cm above it and never grasps. That held up in a test with blocks placed in mirrored pairs (256 episodes per condition).
What’s new and what isn’t #
A fly connectome driving a robot arm isn’t new. FlyArm already runs a whole frozen fly nervous system as the controller of a simulated Franka arm, but it feeds the brain simulator state and leaves the optic lobes without input. My narrower angle is that the arm sees through the fly’s own visual system, from the camera through the optic lobe and brain to the nerve cord, with no state given to the policy. That full chain works, just not reliably yet.
The FlyWire data is CC BY-NC 4.0 (FlyWire Consortium; Dorkenwald et al. 2024, Schlegel et al. 2024), so this stays non-commercial. The code isn’t in a public repo yet. The next big step is running a trained brain on the real dev arm through the Isaac twin and bridge from Argetlam.
3. Argetlam (Sep - Oct 2026) #
Argetlam is where I finally moved real hardware. It lets me drive the dev arm by hand tracking or by voice through NVIDIA Nemotron, and a double jaw clench on a Muse 2 headband works the gripper. Every command goes through one 50 Hz control loop and safety layer into an Isaac Sim twin, and the real arm follows the twin’s joints through the team’s ROS 2 driver. On Oct 28, 2026 the real arm found a block with a depth camera and picked it up on a voice command.
The code is at UBC-Snowbots/Argetlam.
4. Gesture recognition and Follow! (Oct 2026 - present) #
The first beckon detector #
On Oct 9, 2026 I wrote a first gesture detector for the rover camera as a ROS 2 package. It runs YOLO pose on each frame, re-runs pose on full-resolution crops of far-away people, tracks each person with an IoU tracker, and looks at a 2 s window of wrist motion against the shoulders to separate beckons from waves. An event fires after 3 of 5 votes, with a cooldown per person, and goes out as JSON with the person’s bearing. It shipped with 43 tests on synthetic skeletons. On real footage I only smoke-tested it on a few negative clips, where it raised no false beckons.
Orion #
Orion is the vision side of the URC 2027 autonomy task where an astronaut tells the rover to follow them. The rules give full points for a gesture and less for voice, and the gesture has to be readable from body motion alone, so body keypoints are enough. The design rule I built it around is that a false trigger is worse than a miss, because a false Follow! makes the rover drive.
The pipeline runs YOLO11n-pose, an IoU tracker, a 48-frame (3.2 s) window at 15 Hz, and a causal spatio-temporal graph network over the skeleton. It fires only when 6 of the last 8 scored frames agree. The target hardware is the rover’s Jetson Orin NX.
The team hasn’t agreed on the gesture or recorded it yet, so everything measured so far uses a stand-in “hand wave” class built from public skeleton datasets:
| What | Result | Where |
|---|---|---|
| YOLO11n-pose, 2.87M parameters | 2.87-2.99 ms per frame in FP32 | RTX 5080, offline |
| Hand-wave classifier, about 1.1M parameters | Test AP 0.641-0.658 over 3 seeds; recall 0.79-0.84 | Public NTU RGB+D 120 and HMDB51 skeletons |
| Same classifier, by dataset | AP about 0.70 on NTU, 0.15-0.17 on in-the-wild HMDB | Offline |
| Base model pretrained on 171 actions | Test top-1 66.8%, top-5 89.1% | Offline, one seed |
| Fine-tuned from that base | Validation AP 0.71 in 8k steps, against 0.55-0.58 from scratch in 20k | Validation only, one seed |
A couple of things went wrong on the way. My first FLOP estimate for the pose model was off by about 100x because the profiler missed scripted convolutions, so I switched to counting dispatched ops and reran that benchmark. FP16 also came out slower than FP32 on the 5080, and I still don’t know why. The in-the-wild AP is weak, which is the main reason the real gesture needs recordings from the rover’s own camera.
Since then I’ve added a ROS 2 camera source that reads the front RealSense topic, along with a recipe for streaming a laptop camera to the Jetson over H.264 (RTP/MJPEG decoded with corrupted colour). The code is public in LearnFlake2 under orion/.
The Follow! protocol #
I also wrote the protocol for what happens after detection: lock on to the person, track them, follow with Nav2, and stop within 3 m, with staged tests T0 to T5 that each have a pass rule. The first ROS 2 nodes for that protocol have only run on a workstation with synthetic input. None of the staged tests have been run on the rover.
Next for Orion: agree on the gesture, record at least 5 people with the rover’s own camera, fine-tune from the 171-action base, and measure latency and frame rate on the Jetson under normal load before any rover integration.
What didn’t work #
- Hierarchical RL in MuJoCo. Alpha plus Omega never worked well enough, and the saved policy no longer matched its own env a few weeks later.
- Short RLKit probes. A few hundred steps per probe was too little to tell the setups apart.
- Numbers that measured the wrong thing. The 99.7% cube-lift figure, and my own v1 “93% within 5 cm”, both looked better than the task they were supposed to represent. v3’s 93.0% hid a teleporting reset.
- Reward shaping for v4. Getting the sign and scale of the shaping right took several failed runs.
- Spiking fly neurons. The first spiking version of the fly brain scored 0%, and the full spiking chain is still unstable.
- Showing the fly wiring helps. On every task that’s easy enough to learn, an MLP or a rewired graph does as well.
Stack #
- Python, PyTorch
- MuJoCo, RoboSuite, Stable-Baselines3, RLKit
- NVIDIA Isaac Sim 6.0.1 and Isaac Lab 3.0, with rsl_rl for PPO
- FlyWire v783, flyvis, MANC
- ROS 2, YOLO11n-pose and YOLOv8, plus ST-GCN-style graph networks
- Docker on Linux and WSL2