Skip to content
Robotics.world

Research

Maze Runner: Autonomous Maze Navigation with Line-Based Localization and Control Barrier Functions

Releases a C++/ROS 2 maze-navigation stack combining line-based EKF-SLAM, Hybrid A*, and CBF-filtered NMPC, giving engineers a reproducible safe-navigation baseline.

The paper’s first page · arXiv:2611.12949
arXiv
2611.12949 · Preprint · not peer-reviewed
Published
2026-11-06
Authors
Alvaro J. Gaona, Lucas Gómez-Velayos, Peter Pasuy-Quevedo

In plain words

Navigating a maze is hard for a robot for three linked reasons: the walls are sparse and repetitive, so localization from sensor data is ambiguous; the corridors are narrow, so plans must be feasible; and the pose estimate or the map may be wrong, so the controller must stay safe anyway.

Key results

  • Localization accuracy with a known map. The robot drove a 135 m route through the maze with 1.0 cm localization RMSE against the known line map.
  • Localization accuracy in SLAM mode. With the map built online, RMSE rose to 24 cm, quantifying the cost of not having the maze geometry in advance.
  • Controller speed. The NMPC solved in 11.7 ms on average and never exceeded its 80 ms budget.

AI summary

Overview

Research area: Autonomous mobile robot navigation — localization, SLAM, path planning, and safety-constrained control for indoor/maze environments.

Technical level: Intermediate. The paper assumes familiarity with Kalman filtering, occupancy grids, and optimization-based control, but the architecture and design rationale are explained clearly enough for a reader with basic robotics background.

Scope (1 sentence): The paper presents and evaluates an open-source, ROS 2-based autonomy stack for navigating a simulated ROSbot XL through a wall maze, combining line-based EKF localization (or EKF SLAM), grid/Hybrid A* planning, and an NMPC with discrete-time control barrier functions for obstacle safety.

What This Paper Is About

Navigating a maze is hard for a robot for three linked reasons: the walls are sparse and repetitive, so localization from sensor data is ambiguous; the corridors are narrow, so plans must be feasible; and the pose estimate or the map may be wrong, so the controller must stay safe anyway. The authors build a complete, end-to-end software stack — perception, estimation, planning, and control — that addresses all three on a simulated Husarion ROSbot XL with a 2D LiDAR in Gazebo. The goal is a real-time system that needs no installed infrastructure (no beacons or markers), because the walls themselves serve as the landmarks.

Key Contributions

  1. An open, ROS 2 implementation with a ROS-free core. All algorithms are placed in a C++ library with unit tests and no ROS dependency, wrapped by three ROS 2 nodes (one per layer), and built and run from a single reproducible environment (dependencies pinned via RoboStack/pixi). Code is released on GitHub.

  2. A shared line front end for two estimators. RANSAC line extraction with total least squares refinement and per-line uncertainty feeds both an EKF that localizes against a line map derived from the maze mesh, and an EKF SLAM variant that builds that line map online using line landmarks.

  3. NMPC with discrete-time CBF constraints on LiDAR points. Safety is enforced directly on the predicted discrete states against world-frame LiDAR returns (including unmapped obstacles), with a sector-based obstacle selection scheme (16 sectors, nearest point per sector) that bounds the problem size and keeps the solve real-time.

  4. A comparison of online grid planners. A* with 8-connectivity, A* followed by line-of-sight shortcutting, and forward-only Hybrid A* are compared on the maze, including evidence that a Euclidean-only heuristic is insufficient in maze geometry.

Main Findings

  • Localization accuracy with a known map: The robot drove a 135 m route through the maze with 1.0 cm localization RMSE against the known line map.
  • Localization accuracy in SLAM mode: With the map built online, RMSE rose to 24 cm, quantifying the cost of not having the maze geometry in advance.
  • Planner speed: The planner returned a path in 6 ms.
  • Controller speed: The NMPC solved in 11.7 ms on average and never exceeded its 80 ms budget.
  • Heuristic matters in mazes: Without the obstacle-aware (Dijkstra) term, Hybrid A* with a purely Euclidean heuristic did not reach the goal in the experiments within 2 × 10⁶ expansions; combining Euclidean distance with grid path length around walls was required.
  • Odometry limits under mecanum simulation: Gazebo's anisotropic-friction approximation of mecanum rollers causes slip that no constant multiplier can fix — odometry misses about 20% of rotation in a typical turn and up to 40% in the sharpest turns, motivating the slip-density terms added to the EKF process noise.
  • Line map compactness: The maze's vertical faces reduce to 47 infinite lines in Hesse normal form, with collinear faces of different walls sharing one line.
  • Note on completeness: The provided content is truncated during the software section, so the full experiments section (Section V) and any additional metrics — e.g., success rates, collision counts, or per-planner timing tables beyond the 6 ms figure — are not reported in the available text.

Methodology in Plain English

The stack is organized as three layers that each run as a ROS 2 node over a shared, ROS-free core library.

Mapping. Because the maze exists as a 3D mesh in simulation, the map can be extracted directly rather than learned. The system keeps only near-vertical triangles that are at least 0.5 m wide (discarding floors, wall tops, and short end faces), converts each to an infinite line described by a normal angle and a distance from the world origin, and merges duplicates. The same walls are rasterized into a 0.1 m occupancy grid, with cells blocked within 0.6 m of any wall so the planners can treat the robot as a point.

Perception. Each LiDAR scan is first re-expressed in the robot frame at the time of the EKF state (so spinning walls during fast turns do not appear). RANSAC then repeatedly samples point pairs, proposes lines, and keeps the line with the most inliers (at least 10 inliers, 3 cm threshold, 30 iterations, fixed seed for determinism). Each accepted line is refined by total least squares — the line direction is the least-spread direction of the inlier scatter — and given an uncertainty on both its angle and its offset, with floors so a short or near-perfect fit cannot claim implausibly small uncertainty.

Localization. An EKF propagates the pose from wheel odometry using a mid-point arc model, with extra process noise terms that grow with distance traveled and with rotation, to account for sideways and rotational wheel slip. Line observations are matched to map lines by a weighted score on angle and distance difference, rejected if the best match is too far off (30° or 0.5 m) or fails a chi-squared test (threshold 9.21), and applied one line at a time. The result is published as the standard map→odom transform.

SLAM mode. When no mesh is available, the same front end builds the map online: line parameters become part of the state. Because infinite lines are ambiguous in a maze (collinear walls in different corridors look identical), each landmark also stores the extent along its tangent that has actually been observed, and candidates must be seen from the correct side and overlap that extent. New lines are not added immediately — a candidate must be re-sighted 3 times before promotion, and is dropped after 10 unseen scans, preventing a single bad fit from permanently polluting the correlated map.

Planning. A* with an octile heuristic runs on the inflated grid, then a line-of-sight shortcutting pass replaces the staircase grid path with fewer, straighter waypoints (visibility is checked by sampling every half-cell). Alternatively, Hybrid A* searches continuous poses with five forward arcs of 0.3 m at curvatures up to 1/1 m, merging states into 72 heading bins, with a curvature penalty and a heuristic that is the max of Euclidean distance and a precomputed Dijkstra distance around walls.

Control. A nonlinear MPC over a 20-step (2 s) horizon tracks a densified reference path, penalizing state error, control effort, and changes in command (the rate term prevents the solver from dithering between passing an obstacle on the left or the right). Safety enters as discrete-time control barrier constraints: for each selected LiDAR point, the squared distance to that point may shrink by at most a fraction (γ = 0.1) per predicted step, so the robot can approach walls but only at a geometrically decaying rate and can steer as well as brake. Slack variables with a large linear penalty keep the problem feasible when the robot is boxed in. The problem is built once with CasADi and solved with IPOPT, warm-started from the shifted previous plan; the solver's CPU time is capped at 0.8 of the control period, a failed solve falls back to the shifted previous plan for up to 5 steps, and the robot stops if the pose or scan is stale.

Why This Matters

The paper's value is integration and honesty about failure modes: it shows a full stack where the map, the perception front end, the estimator, and the safety layer are all consistent with one another, and it reports where the approximations break (mecanum slip, SLAM drift relative to a known map).

Real-world applications:

  • Warehouse and fulfillment robots navigating aisles and shelving where geometry is repetitive and GPS is unavailable.
  • Inspection robots in structured indoor facilities (substations, plant rooms, corridors) where wall geometry is the only reliable landmark.
  • Service and delivery robots in buildings where installing beacons or markers is impractical.
  • Any deployment where the map is incomplete or wrong and the controller must still avoid unmapped obstacles — the CBF-on-LiDAR-points design addresses exactly this.

Industry relevance: The stack targets ROS 2 and is packaged with pinned, reproducible dependencies, which lowers the barrier to reuse. The measured solve times (6 ms planning, 11.7 ms average NMPC against an 80 ms budget) speak directly to deployability on modest onboard compute, and the decomposition into a ROS-free, unit-tested core is a pattern industrial teams can adopt for verification.

Future Directions

  • Closing the SLAM gap. The 24 cm SLAM RMSE versus 1.0 cm with a known map suggests improving landmark management (extent reasoning, loop closure, or better handling of collinear ambiguity) is the largest accuracy lever.
  • Modeling slip explicitly. Odometry losing 20–40% of rotation in turns indicates that a learned or slip-aware motion model, or fusing LiDAR scan matching into the prediction, could reduce drift and the reliance on inflated process noise.
  • Extending beyond simulation. All results are in Gazebo on a simulated ROSbot XL; validation on physical hardware, with real sensor noise and real mecanum dynamics, is the natural next step.
  • Comparing planners more fully. The paper sets up an A* / A*-with-shortcutting / Hybrid A* comparison; a fuller characterization (path length, smoothness, planning time, and controller tracking error per planner) would clarify when the more expensive kinematically feasible search pays off.

Target Audience

Robotics graduate students and researchers working on indoor mobile robot autonomy; engineers building ROS 2 navigation stacks who want a worked, reproducible example of combining line-based EKF/SLAM with NMPC and control barrier functions; and practitioners interested in safety filters that use raw LiDAR returns rather than a mapped obstacle list. Readers wanting only the safety-control idea can read Sections III-E and IV; readers interested in line-based estimation can focus on Sections III-B through III-D.

Authors’ abstract

Maze navigation requires localization from sparse, repetitive geometry, planning through narrow corridors, and control that stays safe when the estimate or the map is wrong. We present Maze Runner, an open autonomy stack in C++ and ROS 2 that addresses these needs end to end on a simulated Husarion ROSbot XL with a 2D LiDAR in Gazebo. Perception extracts wall lines from each scan with RANSAC and total least squares, with per-line uncertainty. The same line front end feeds…

The full abstract on arXiv
Read the original paper

Related papers