Bachelor’s Thesis • 2023

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

Autonomous Robot Operation Behavior Trees Collision Avoidance Collision Detection Finite-state Machines Road Crossing ROS

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.

1

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.

2

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.

3

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:

BibTeX
@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

5Scenarios
8Simulation runs
4Vehicles (max)
0.52 mTightest clearance
1Safety abort

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.

Scenario 1

Three-lane traffic

15.3 s 3 vehicles 0.54 m min 186 holds
Scenario 1 trajectory animation
Trajectory
Scenario 1 velocity profile
Velocity
Scenario 1 clearance to vehicles
Clearance to vehicles

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.

Scenario 2 · run 1

No safe gap

Safety stop — 2 vehicles 1.74 m min 511 holds
Scenario 2 · run 1 trajectory animation
Trajectory
Scenario 2 · run 1 velocity profile
Velocity
Scenario 2 · run 1 clearance to vehicles
Clearance to vehicles

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.

Scenario 2 · run 2

Tight gap

6.9 s 2 vehicles 1.00 m min 101 holds
Scenario 2 · run 2 trajectory animation
Trajectory
Scenario 2 · run 2 velocity profile
Velocity
Scenario 2 · run 2 clearance to vehicles
Clearance to vehicles

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).

Scenario 2 · run 3

Clear road

4.3 s 2 vehicles 0.63 m min 0 holds
Scenario 2 · run 3 trajectory animation
Trajectory
Scenario 2 · run 3 velocity profile
Velocity
Scenario 2 · run 3 clearance to vehicles
Clearance to vehicles

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).

Scenario 3

Crossing traffic

9.4 s 2 vehicles 1.01 m min 185 holds
Scenario 3 trajectory animation
Trajectory
Scenario 3 velocity profile
Velocity
Scenario 3 clearance to vehicles
Clearance to vehicles

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).

Scenario 4 · run 1

Three vehicles

13.4 s 3 vehicles 0.74 m min 68 holds
Scenario 4 · run 1 trajectory animation
Trajectory
Scenario 4 · run 1 velocity profile
Velocity
Scenario 4 · run 1 clearance to vehicles
Clearance to 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).

Scenario 4 · run 2

Heavy waiting

26.1 s 3 vehicles 0.52 m min 659 holds
Scenario 4 · run 2 trajectory animation
Trajectory
Scenario 4 · run 2 velocity profile
Velocity
Scenario 4 · run 2 clearance to vehicles
Clearance to vehicles

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.

Scenario 5

Four vehicles

13.5 s 4 vehicles 0.85 m min 101 holds
Scenario 5 trajectory animation
Trajectory
Scenario 5 velocity profile
Velocity
Scenario 5 clearance to vehicles
Clearance to 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.

ScenarioCrossedMin clearanceΔtMin TTC
1: Three-lane traffic✓0.54 m0.661.16 s
2.1: No safe gap✗1.74 m——
2.2: Tight gap✓1.00 m0.591.14 s
2.3: Clear road✓0.63 m0.94—
3: Crossing traffic✓1.01 m0.421.47 s
4.1: Three vehicles (low margin)✓0.74 m0.751.24 s
4.2: Heavy waiting (high margin)✓0.52 m0.381.17 s
5: Four vehicles + noise✓0.85 m0.850.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.

On-board recording of the real crossing
Recorded trajectory of the real-world crossing
Recorded trajectory of the real crossing