Autonomous Road Crossing with a Mobile Robot
CTU Digital Library • Jan Vlk
- Overview & Citation Overview
- Results Results
Abstract
This work proposes, implements, and evaluates a control algorithm for safe road crossing with a mobile robot. The algorithm uses a behavior tree and the positions of surrounding vehicles to decide when it is safe to cross. I implemented it in simulation and tested it on a physical robot. In all seven simulation runs that offered a safe gap, the robot crossed while keeping at least 0.52 m from every vehicle.
Keywords
How it works
Perceive
The robot tracks the position and motion of every vehicle around it, projecting where each one will be over the next few seconds.
Decide
A behavior tree continuously evaluates whether moving forward would risk a collision. If so, it holds the robot in place and re-checks.
Cross
Once a sufficient gap appears, the robot commits and crosses at up to 1 m/s, keeping a safe clearance to every vehicle.
Algorithm design
After evaluating monolithic, finite-state machine (FSM), and behavior tree approaches, I chose a behavior tree for its modularity, reactivity, and scalability. The algorithm runs three sub-trees in sequence, each handling one phase of the crossing.
Init
Checks that the robot is close enough to the correct road, evaluates the suitability of the crossing location, and, if needed, navigates to a better spot using OpenStreetMap (OSM) data.
Perpendicular
Uses GPS and a magnetometer to orient the robot perpendicular to the road, minimizing the crossing distance. Each orientation step retries up to 10 times; if the robot drifts onto the road during rotation, a fallback moves it back to the curb.
Crossing
The core decision loop, re-evaluated every tick. Computes the velocity range that would cause a collision with each detected vehicle, then cascades: move forward at full speed if no risk → move at a safe velocity if one is available → hold if stopping is safe → retreat if a gap is behind → stop as a last resort.
Citation
BibTeX Citation
If you use this work, please cite the following:
@mastersthesis{Vlk2023RoadCrossing,
title={Autonomous Road Crossing with a Mobile Robot},
author={Jan Vlk},
school={Czech Technical University in Prague},
type={Bachelor's Thesis},
year={2023},
url={http://hdl.handle.net/10467/109306}
}
Published in:
CTU Digital Library
Simulation results
Each run shows the trajectory (robot in magenta, vehicles in other colors), the velocity profile, and the clearance to each vehicle over time. The minimum clearance is marked on the distance plot.
Three-lane traffic
Tests optimal velocity calculation with three vehicles in a line. The robot holds while all three pass, then crosses. Min clearance 0.54 m; efficiency ratio Δt = 0.66.
No safe gap
Tests trajectory prediction: a vehicle decelerates to a stop inside the robot’s path. With no safe gap, the controller correctly refuses to advance (511 safety holds) and never crosses. Min clearance 1.74 m.
Tight gap
Vehicle decelerates to a stop just past the robot’s path, opening a gap. Robot accepts it and crosses in 6.9 s with a 1.0 m margin (Δt = 0.59).
Clear road
Vehicle decelerates to a stop before reaching the robot’s path, so the road is clear from the start. No holds are triggered and the robot crosses immediately (Δt = 0.94).
Crossing traffic
Multiple vehicles starting at greater distance and higher velocity, testing inter-vehicle gap handling. Robot waits for a safe window, then commits with a 1.0 m margin (Δt = 0.42).
Three vehicles
Tests velocity margin impact (margin = 0.15 m/s). Robot threads a gap in front of the closer vehicle, crossing with a 0.74 m clearance (Δt = 0.75).
Heavy waiting
A higher velocity margin (0.25 m/s) raises the safety threshold. The robot judges the gap too tight and waits for both real vehicles to clear, resulting in 659 holds across 26 s; the third detected vehicle simulates a detection-module error. The safety margin directly controls how conservative the robot is.
Four vehicles
Tests robustness against random positional detection noise injected across all four vehicles. Despite the jerky motion caused by noise, the robot maintains a safe 0.85 m clearance (Δt = 0.85).
Evaluation summary
Δt = empty-road time / actual crossing time (higher = more efficient). Min TTC = minimum time-to-contact assuming the vehicle stops and the robot maintains its current trajectory.
| Scenario | Crossed | Min clearance | Δt | Min TTC |
|---|---|---|---|---|
| 1: Three-lane traffic | ✓ | 0.54 m | 0.66 | 1.16 s |
| 2.1: No safe gap | ✗ | 1.74 m | — | — |
| 2.2: Tight gap | ✓ | 1.00 m | 0.59 | 1.14 s |
| 2.3: Clear road | ✓ | 0.63 m | 0.94 | — |
| 3: Crossing traffic | ✓ | 1.01 m | 0.42 | 1.47 s |
| 4.1: Three vehicles (low margin) | ✓ | 0.74 m | 0.75 | 1.24 s |
| 4.2: Heavy waiting (high margin) | ✓ | 0.52 m | 0.38 | 1.17 s |
| 5: Four vehicles + noise | ✓ | 0.85 m | 0.85 | 0.88 s |
All minimum clearances are at least 0.52 m, and all minimum TTC values exceed 0.8 s, well above the ~0.2 s detection latency, so the algorithm has enough time to react in every scenario.
Real-world validation
I deployed the same controller on a Boston Dynamics Spot in the courtyard of the CTU Faculty of Electrical Engineering. The vehicle detection node was developed separately and wasn’t finished yet, so a supervisor walking alongside the road carried AprilTag fiducial markers that stood in for vehicles. The robot used GPS and a magnetometer to orient itself perpendicular to the road, waited for a safe gap, and crossed autonomously.