Giter Club home page Giter Club logo

f1tenth_ws's Introduction

f1tenth_ws

This a repository that contains ready-to-run autonomous racing packages for the F1TENTH on ROS2 Foxy. It can be directly be deployed on the physical car. We've also included launch and config files for the simulation environment, which uses slightly different topics for odometry.

Below is a demo of the car running the code from this repository in the E7 building at the University of Waterloo at a top speed of ~25km/h, record on March 13th 2023.

0.96x.1.1.1.mp4

Software Stack Overview

Our current software stack consists of

  • slam_toolbox for mapping (reference the following slides for running it on the physical car)
  • Particle Filter for localization $\rightarrow$ src/particle_filter
  • Pure Pursuit for waypoint following (planning + control) $\rightarrow$ src/pure_pursuit
  • RRT for a pure pursuit algorithm that includes dynamic obstacle avoidance (slightly slower) $\rightarrow$ src/rrt

Racing lines are generated through the Cl2-UWaterloo/Raceline-Optimization repository.

Other algorithms that are not used, but are in this repository include

  • Waypoint Generator for manually generating waypoints in simulation $\rightarrow$ src/waypoint_generator (this has been replaced with a script that automatically generates optimal racelines given a map)
  • A PID controller for staying at a constant distance to the wall $\rightarrow$ src/wall_follow
  • Scan matching $\rightarrow$ src/scan_matching (To be completed)
  • gap_follow $\rightarrow$ src/gap_follow (To be completed)

High-Level Usage Guide

These are the high level steps followed to get the F1TENTH driving in a new location:

  1. Run SLAM on the physical car to generate a map with slam_toolbox
  2. Clean up map in Photoshop, and generate a racing line using the Cl2-UWaterloo/Raceline-Optimization repository.
  3. Store the racing lines under src/pure_pursuit/racelines/ and src/rrt/racelines/ (for dynamic obstacle avoidance)
  4. Run particle_filter with the new map to localize the car properly
  5. Run pure_pursuit or rrt to follow the racing line. Make sure to incrementally increase the velocity_profile inside the config.yaml file.

You can consult these accompanying notes: https://stevengong.co/notes/F1TENTH-Field-Usage, which shows every command used to get code working the physical car. Note that they are mainly written for our own personal reference, so the paths will be different in your setup.

If you feel confused / stuck by all of this, you might want to start with following the F1TENTH Course, where they actually teach why these algorithms are needed, and how they are implemented. The official documentation describes how to setup the hardware and basic software for the car.

Running Simulation

If you want to run these nodes inside the simulation environment, you need to clone the simulation repository. Then, you should mount this repository's packages to the docker-compose.yml file:

- INSERT_PATH_HERE/f1tenth_ws/src:/sim_ws/src

Each package can then be built inside the simulation environment.

Next Steps

A non-exhaustive list of things we want to do in the future, include

  • Running SLAM + pure pursuit on the fly, without having to do the offline computation. Something like this would be incredible

About Us

The Control, Learning and Logic (CL2) group at the University of Waterloo works on research that aims to develop methods for reliable decision-making of autonomous systems in the wild, led by professor Yash Vardhan Pant. Current members working on the F1TENTH is composed of Steven Gong, Oluwatofolafun Damilola Opeoluwa-Calebs, and Soham Lakhi.

f1tenth_ws's People

Contributors

hzheng40 avatar gongsta avatar kimnluong avatar nandantumu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.