Skip to content

Code for our F1Tenth head to head race - includes opponent estimation using 2D Lidar data and Kalman filters and planning to overtake.

Notifications You must be signed in to change notification settings

vaithak/f1tenth-icra-race

Repository files navigation

Race stack for F1Tenth Autonomous Racing

Updates:

Building:

  1. Clone this repo

  2. This repo uses some custom message types for communication, defined here: https://github.com/vaithak/f1tenth_icra_race_msgs

    git clone git@github.com:vaithak/f1tenth_icra_race_msgs.git
    colcon build --packages-select=f1tenth_icra_race_msgs
    
  3. Update the config/r3.params.yaml file by changing the location of the waypoints file included in the repo - race3-manual-fitted.csv

  4. Build the package

    colcon build
    source install/local_setup.bash
    

Running

  • Launch the object and tracking subsystems ros2 launch f1tenth_icra_race r3.oo.launch.py
  • Launch the spliner and state machine ros2 launch f1tenth_icra_race r3.ss.launch.py
  • Launch the controller ros2 launch f1tenth_icra_race r3.c.launch.py

Subsystems and workings

  • Opponent Detection and tracking:
    • It uses a clustering method with an adaptive breakpoint algorithm to create bounding box
      rectangles for obstacles.
    • Uses a simplified Extended Kalman Filter for Velocity tracking (assumes a single obstacle).
    • Implemented in C++ for realtime performance of 50Hz.
    • Reference: https://github.com/kostaskonkk/datmo
  • Spline-based real-time planner and state machine:
    • Real-time updating of local waypoints if an obstacle is detected in front of the car.
    • Decides which side to overtake from and fits a cubic spline to update the waypoints.
    • State machine to decide when to trail vs when to overtake
    • Reference from ForzaETH: https://arxiv.org/abs/2403.11784
  • Pure Pursuit-based controller:
    • Pure Pursuit controller with sector-wise adaptive lookahead and velocity mapping.

Working demo on sim

Screencast.from.05-04-2025.07.11.06.AM.webm

About

Code for our F1Tenth head to head race - includes opponent estimation using 2D Lidar data and Kalman filters and planning to overtake.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •