A robot that learns by trial and error on real hardware needs two things it usually borrows from the lab. The first is a trustworthy estimate of where it is, typically supplied by a ring of motion-capture cameras. The second is a way to keep its experiments from breaking things. Take the cameras away and let the robot estimate its own pose from onboard cameras and inertial sensors, and those estimates slowly drift. Any safety rule written in terms of absolute position, such as "stay 0.3 m from the wall at x = 4," then starts to lie: the robot believes it is safe while it is physically crossing the line. This note proposes a simple remedy. Split the robot's state into the parts onboard sensing measures without drift (velocities, tilt, contact forces, and distances to nearby things seen by the camera or depth sensor) and the parts that drift (global position and heading). Write every safety constraint, and every input to the learned correction, only in terms of the drift-free part. Let the drifting global estimate steer only the coarse, hand-designed base controller, where small errors do little harm.
The learning method is residual reinforcement learning. In this approach a fixed base controller does most of the work, and a small learned network adds a correction $\Delta a$ on top of the base action. The claim is that where the state is split, not only whether it is split, determines whether residual learning can explore safely without motion capture. If the split follows estimation-uncertainty boundaries rather than physical geometry, two things should follow. Safety violations should stay flat as episodes grow longer and drift grows. The residual should also stop fighting the base controller, because it no longer has to cancel base-controller errors caused by a wrong coordinate frame.
Core Claim
The existing pieces each cover part of the problem. Focus-Then-Contact (FTC) trains an additive residual on top of an imitation-learned base policy using wrist cameras and no motion capture. It reaches 100% success on six real contact tasks, but it has no safety constraint; recovery is left to human intervention. RES-DOB-CBF wraps reinforcement learning in a control barrier function filter, meaning a small optimization that minimally edits each action so a safety function never decreases too fast. Its filter is made robust by learning residual dynamics. It assumes good state feedback, though, and it learns residual dynamics, not a residual policy. SOOPER explores safely by handing control back to a safe prior policy whenever pessimistic cost predictions exceed the budget, and it trained on a real RC car with zero collisions. It too assumes full state and episodic resets.
On the decomposition side, D3 and Konidaris et al. factor state by physical role or by which variables actions change. Both assume every variable is known exactly. None of this work factors state by how well it can be estimated onboard. That is the new ingredient here.
The split is not arbitrary. For visual-inertial odometry (tracking the robot's own motion from a camera plus an inertial sensor), it is standard that global position and heading are unobservable and drift, while velocity, roll, pitch, and camera-relative geometry stay bounded. Zhan et al. show the practical side of this. Their onboard pipeline on an aerial manipulator estimates contact-time velocity to 0.0121 m/s RMSE, and they close the control loop in image space specifically to avoid depending on global pose.
We write the state as $s = (z, g)$. Here $z$ is the drift-free factor: body velocity, gravity direction, contact wrench, and relative distances and bearings to obstacles or task features. The term $g$ is the drifting global pose estimate. Safety constraints are written as $h(z) \ge 0$. The residual is $\Delta a = \pi_\theta(z, a_{\text{base}})$. Crucially, it sees the base action but not $g$. The base action $a_{\text{base}}(g, z)$ may use $g$ for navigation.
The contrast with the obvious alternative can be stated precisely. A global constraint $h(g)$ made robust to drift must shrink the allowed region by a margin $\delta(t)$ that grows with elapsed time $t$. It grows roughly linearly, $\delta(t) \approx \rho t$ for drift rate $\rho$, because dead-reckoned error accumulates. The relative constraint's margin depends only on the bounded error of $z$ and does not grow with $t$.
Research Program
The system has three layers. First, a nominal base controller: a waypoint follower driven by the onboard odometry estimate and a coarse map, with no learning. Second, a safety filter evaluated only in $z$. We follow the onboard geofencing work, which checks safety implicitly by simulating a simple backup controller forward in time rather than solving a quadratic program. That filter ran at 400 Hz in about 350 μs on a 10 g microcontroller. We reuse its mechanism, but the forward simulation runs over relative obstacle geometry instead of an absolute geofence. Third, a residual network trained under a constrained objective. The constraint is enforced with a Lagrange multiplier whose update is damped by a proportional-integral-derivative rule, as benchmarked in Safety Gymnasium. The filter keeps training-time violations near zero, and the constrained objective teaches the residual to stop relying on the filter.
The residual's output is initialized near zero, following the practice attributed in the file to Puhao Li. The system therefore starts as the base controller and deviates only as needed. The base stays frozen, which avoids the forgetting documented by Pari et al..
Three analyses accompany the build. The first measures violation rate and task return as a function of episode length and injected drift rate. The second tests for residual antagonism. It records high-frequency oscillation in the residual (energy above a cutoff frequency) and actuator saturation time, comparing the conditions where the residual does and does not see $g$. The third documents the method's scope honestly. Constraints that are truly absolute, such as a legal geofence with no visible boundary, cannot be rewritten in $z$ and still need an inflated margin. We report which constraints in each task could and could not be converted.
Proposed Experiments
In simulation, we build a drifting-odometry variant of Safety Gymnasium's Point and Car Goal tasks. The agent receives a random-walk-biased position and heading estimate. It also receives the benchmark's existing relative lidar-style readings of hazards. The base controller navigates to goals using the biased estimate and a map of hazard locations. Cost is computed from true position. We sweep drift rate across a range, including zero, and episode length from the standard horizon up to several times longer. This yields violation-versus-drift curves for every method.
On hardware, we use a small ground car in the style of the F1/10 and RC-car platforms of RES-DOB-CBF and SOOPER. It carries onboard camera and inertial odometry and no external tracking, and it runs repeated laps of an obstacle corridor in an uninstrumented room. Violations are counted by an overhead camera used only for scoring, never for control. The metrics are violations per lap during training, final return, and the oscillation and saturation measures.
Baselines
The naive reference point is the base controller alone, running on onboard odometry without any residual. It shows how much drift hurts an unlearned system and sets the return any learner must exceed.
The unconstrained residual is an FTC-style additive residual trained with plain reward on the full state $(z, g)$. It isolates what safety handling adds; FTC reports 100% task success but no violation statistics.
The monolithic constrained residual trains the same residual with Lagrangian optimization, using the damped multiplier update, on the full state. Its constraint is written over the drifting global estimate. Safety Gymnasium reports that Lagrangian PPO cut violations by 98% relative to PPO at a 45% reward cost on velocity tasks, under exact state.
The strongest competitors are three drift-aware adaptations of existing safe-exploration methods. One is RES-DOB-CBF run on onboard odometry. Its published hardware figure is 2.07 violations per trip, down from 146 for unconstrained RL on an F1/10 car, with high-grade positioning. The second is SOOPER run on onboard odometry. It reports zero violations in simulation and zero collisions on a real RC car, with twice the prior's reward, under full state. The third is a margin-inflated global barrier filter whose margin is set from the measured drift rate. For all methods under drifting onboard state, no reported result was found on Lacuna.
Every method shares the same base controller, sensors, number of environment steps, network size, and a matched hyperparameter search budget, which we fix at an equal number of tuning trials per method. Beating the strongest baseline means two things together. First, violations per episode must be no higher than the margin-inflated filter and SOOPER at every drift level. Second, return must be significantly higher at the longest episodes, or violations lower where those baselines' margins do not hold.
The key ablations remove one ingredient each. One gives the residual access to $g$ while leaving the constraint in $z$. The other writes the constraint over $g$ while keeping the residual on $z$. Together they separate the two halves of the claim.
Why not just…?
Why not just inflate the safety margin of a global barrier function by the drift bound? This is the real threat. For short episodes or slow drift it may match our method. The experiments settle it with the drift-rate and episode-length sweep. If the inflated filter's return does not fall off as $\delta(t)$ grows, the relative factorization buys nothing and we will say so. We expect inflation to become freezing-conservative in long corridors. That is the "safe but useless" failure Quanyi Li et al. describe for heavy penalties, here arising from geometry rather than reward.
Why not just run SOOPER or RES-DOB-CBF on the onboard estimate? Both are designed around trustworthy state, and their pessimism accounts for model uncertainty rather than slowly biased state. A drifted estimate can therefore look confidently safe. We run both exactly this way as baselines. If their violation counts stay flat with drift, the core claim fails.
Why not just use image-based visual servoing and skip learning? Zhan et al. show that it avoids global drift. Our safety filter borrows the same principle of working in relative coordinates. Servoing alone, however, does not adapt to unmodeled friction or dynamics, and the file's own objections note that it loses features during aggressive motion. The base-only reference measures how much return the learned residual adds on top of such a classical loop.
Why not just give an end-to-end policy the full state plus odometry covariance? Covariance reports uncertainty but not which direction the bias lies in. The monolithic constrained residual with covariance inputs added is a cheap extra arm of the experiment. If it closes the gap, the factorization reduces to feature engineering.
Decisive Checks
The idea stands or falls on two curves. The first is violations per episode against drift rate at long horizons. It should be flat for our method and rising for every method whose constraint lives in $g$. The second is residual oscillation energy with and without $g$ as input. It should be lower when the residual cannot see the drifting frame, with return equal or better. On hardware, the result must appear as fewer overhead-scored violations per lap than RES-DOB-CBF and SOOPER running on the same onboard odometry, at matched or higher lap speed.
References
- Focus-Then-Contact: Speeding Up Robotic Contact-Rich Task Learning with Affordance-Guided Real-World Residual Reinforcement Learning
- Disturbance Observer-based Control Barrier Functions with Residual Model Learning for Safe Reinforcement Learning
- Safe Exploration via Policy Priors
- Divide, Discover, Deploy: Factorized Skill Learning with Symmetry and Style Priors
- Constructing Symbolic Representations for High-Level Planning
- Aerial Manipulation with Contact-Aware Onboard Perception and Hybrid Control
- Onboard Safety Guarantees for Racing Drones: High-Speed Geofencing With Control Barrier Functions
- Safety Gymnasium: A Unified Safe Reinforcement Learning Benchmark
- Teach a Robot to FISH: Versatile Imitation from One Minute of Demonstrations
- MetaDrive: Composing Diverse Driving Scenarios for Generalizable Reinforcement Learning