ROS F1/10 Autonomous Racing Simulator

Varundev Suresh Babu and Prof. Madhur Behl
Computer Science | Link Lab | University of Virginia

Varundev Suresh Babu
Ph.D. Candidate
Computer Engineering
University of Virginia
Email: varundev@virginia.edu

What is F1/10 [f1tenth] ?

f1tenth.org

Similar dynamics, different parameters

Similar sensors,different scaleSensor Integration

LiDAR

CameraIMU

IR Depth Cameras

Sensor Integration

LiDAR

Wi-fi Telemetry

CameraIMU

Onboard Computer

IR Depth Cameras

MotorController

MODEL PREDICTIVE CONTROLFOLLOW THE GAP METHOD
Follow thegap method

Generatedpaths

Max. cost(obstacle)

Drivableregion

Drivableregion

Simpleobstacle
avoidance

Dynamicobstacle

F1/10
RGB FPVEND-TO-END DNN

FPV data annotation

F1/10 FPV

Mediumcost
Unexploredspace

Cost Map Legend

V2V COLLABORATION
I’m ata stop sign

Collaborative
behavior
automaton

Predicted steering (blue)
Ground Truth (green)

Env. Vehicle
Path

Environment
vehicleEgovehicle

COMPUTER VISION EXAMPLELANE KEEPING ASSIST

Original image

ThresholdmaskingHoughtransform

Optical flow

F1/10 online semantic segmentation

LOCALIZATION AND MAPPINGLane detection pipeline
Currently tested
On F1/10Hector
SLAM

AMCLSensor
Scan region

GoogleCartographer

ORBSLAMVehicle
chassis

Laser
ScannerTrackboundaries

Localizedvehicle
Travelpathrviz visualization

Global planning using rviz

ROS transform frame1st F1/10 Race: Oct 2016, Pittsburg, ES-Week

2nd F1/10 Race: Apr 2018, Porto, CPS-Week

3rd F1/10 Race: Oct 2018, Torino, ES-Week

4th F1/10 Race: Apr 2019, Montreal, CPS-Week

America

Europe & Asia

Limitations

Hardware cost -$ 3000

Slow Algorithm Development
From design to hardware implementation

ROS F1/10 Autonomous Racing Simulator

f1tenth.dev

Simulator Requirements+
18.04 (bionic)+Melodic

Instructions on f1tenth.dev

roslaunch f1tenth-sim simulator.launch

Simulator Elements
RacecarRace Track

Algorithms

Simulator Architecture
Simulator Back End

Front End

Route Planning
Control Plugin

Navigation Stack
TEB planner
Pure Pursuit

Localization
AMCL
GPU Particle Filter

Controller Manager

Vehicle Model
Sensor Plugin

TF Broadcaster
Odom → Base
Base → Laser
Base → Camera

Simulated Environment
Race Track
Flag Post & Start Line
Lap Counter

Simulated RacecarState Estimation
Precise Odom

Data Visualization

Front End
Simulator Back End

Front End

Route Planning
Control Plugin

Navigation Stack
TEB planner
Pure Pursuit

Localization
AMCL
GPU Particle Filter

Controller Manager

Vehicle Model
Sensor Plugin

TF Broadcaster
Odom → Base
Base → Laser
Base → Camera

Simulated Environment
Race Track
Flag Post & Start Line
Lap Counter

Simulated Racecar

State Estimation
Precise Odom

Data Visualization

Navigation and Control Algorithms
Simulator Back End

Front End

Route Planning
Control Plugin

Navigation Stack
TEB planner
Pure Pursuit

Localization
AMCL
GPU Particle FilterController Manager

Vehicle Model
Sensor Plugin

TF Broadcaster
Odom → Base
Base → Laser
Base → Camera

Simulated Environment
Race Track
Flag Post & Start Line
Lap Counter

Simulated Racecar

State Estimation
Precise Odom

Data Visualization

Gazebo and Visualization
Simulator Back End

Front End

Route Planning
Control Plugin

Navigation Stack
TEB planner
Pure Pursuit

Localization
AMCL
GPU Particle Filter

Controller Manager

Vehicle Model
Sensor Plugin

TF Broadcaster
Odom → Base
Base → Laser
Base → Camera

Simulated Environment
Race Track
Flag Post & Start Line
Lap Counter

Simulated Racecar

State EstimationPrecise Odom

Data Visualization

Racecar Model
Size & Performance
ReplicatedSimulated F1/10 Racecar• Customizable color• Multiple sensors

CAD, xacro, urdf
F1/10 Autonomous
Racecar Platform

Powertrain(with Ackermann dynamics)

GazeboSensor Plugins

4 Wheel Independent Drive(with hard differential constraints
enforced by control plugin)
Modular Construction• LiDAR on Top• Camera on the hoodModular Design
Primary Navigation Sensor
2D Scanning LiDAR•••••

Hokuyo sensor plugin
LaserScan.msg message typeRange (4.0m to 30.0m)
Scan Angle (180 to 360 degrees)
Position changed in URDF

Modular Design
Secondary Navigation Sensors••••

Stereo Camera
Depth Camera
IMUFront/Rear Two Point RadarModular DesignRacecar Chassis(Shell, powertrain,Collision sensor, controller)

••
•
•
•

Collision sensor
Rear Wheel/ All wheel drive
Speed set as RPM or m/s
Differential enable/disable
Energy meter and bank with boost

Racecar Control Nodes

tf Nodes (static & dynamic)

Command, Control & Feedback Node/car_name/base_laser_link/car_name/base_odom_link/car_name/control_plugin

Node Graph

Control Plugin
Command & Control

Message Type:AckermannDrive.msg

Control Plugin
Command & Control

Steering Column Controller
Ackermann Steering Geometry
Float64.msg

Message Type:AckermannDrive.msg

Control Plugin
Command & Control

Wheel RPM Controller

PID Speed Control
Float64.msg

Message Type:AckermannDrive.msg

tf-TreeRacecar Object Creation

Racecar Object Creation

Unique namespaceRacecar Object Creation

Visual paint scheme

Racecar Object Creation

Circuit-Breaker(keeps only one
session active)

Racecar Object Creation

Racecar spawnlocation

Spawn Multiple Racecars
rqt_graph of 3 cars

Namespace resolution handled by ROS
Capable of implementing different controllers

Multiple Racecars (tf-frames)

Simulated Race Track

Race Track creation process

Sketch a 2D track

Convert to 3D mesh

Export as STL/DAE

Race-Track Setup (Gazebo View)

Race Car

Drivable Area
Track Bounds

Race-Track Setup (rviz View)
Race Track Map

Front Camera View
First Person View (FPV)Mapping – Hector SLAM

roslaunch f1tenth-sim simulator.launchroslaunch f1tenth-sim mapping.launchLocalization – GPU Particle Filter

roslaunch f1tenth-sim simulator.launchroslaunch f1tenth-sim localization.launchLocalization(Implemented for multiple vehicles)
Odometry sources• Gazebo (available, default option)• Laser Scanmatcher (available, implemented)• Virtual Wheel Encoders (work in progress)

Provided by• AMCL (default, implemented)• GPU Particle Filter (available, tested)Motion Planning – ROS Navigation with TEB Plannerroslaunch f1tenth-sim navigation.launchMultiple Independent Navigation

FPV View

Racing Algorithms (Single Racecar)roslaunch f1tenth-sim purepursuit_one_car.launchRacing Algorithms (Multiple Racecars)

Sensors
Hokuyo 2D LiDAR
RGBD Camera
Collision Sensor

Mapping
Hector, Cartographer
Localization
AMCL, GPU Particle Filter

Algorithms

Control
Ackermann Steering
Traction Control
Realistic dynamics

Motion Planning
ROS Navigation
TEB Planner

f1tenth.dev
Open Source*Advanced Pure-Pursuit
With Adaptive Lookahead
Autonomous Overtake
Head-to-Head Racing
Dynamic Obstacle Avoidance* Planned

Modularity

Autonomous Racing
ResearchGet Started

f1tenth.dev

varundev@virginia.edu