Autonomous F1/10th Car
RRT, AMCL, Dead Reackoning and PID Controller on a 2D lidar enabled F1/10th car to win first place in an autonomous car race.
This project walks through the development of an autonomous F1/10th car step by step.
We utilized the F1/10th simulator built in Unity by the University at Buffalo Distributed Robotics and Networked Embedded Systems Lab. Alternative simulators such as Isaac Sim and Gazebo can also be used.
This project was part of the CSE568 Robotics Algorithms course at the University at Buffalo. Due to academic integrity policies, the code cannot be shared.
Prerequisites
Ensure you have the following dependencies installed before running this project:
- ROS Noetic
- Gazebo/Unity
- Python 3.8+
- Ubuntu 20.04
Installation guides:
The simulator includes built-in sensors for LiDAR, IMU, and odometry.
ROS provides a powerful visualization tool called Rviz, which allows real-time visualization and interaction with standard ROS data types, such as point clouds and markers.
Understanding transformations is crucial in robotics and essential for mastering ROS.
Go-To-Goal Navigation
The first step in designing an autonomous vehicle is implementing a go-to-goal algorithm. This algorithm takes the vehicle's goal position as input and computes a path to it.
Initially, we use exact odometry data from the simulator to simplify path planning. A PID controller is employed for path tracking.
PID Controller
A Proportional-Integral-Derivative (PID) controller is used to control the vehicle's movement. It consists of:
- Proportional (P): Corrects errors based on current deviation.
- Integral (I): Addresses accumulated past errors.
- Derivative (D): Predicts future errors based on rate of change.
Gap Follow
In this stage, the vehicle races on a circuit with randomly placed obstacles. A 2D LiDAR sensor detects obstacles, and a combination of PID control and bicycle kinematics is used to navigate the track effectively.
Fully Autonomous F1/10th Car
In real-world scenarios, exact odometry data is unavailable. Instead, we estimate odometry and correct it when significant drift occurs.
To achieve real-world autonomy, we integrate the following algorithms:
RRT - Rapidly-exploring Random Tree
RRT is a motion planning algorithm that explores the environment to generate feasible paths from the vehicle's current position to the goal.
AMCL - Adaptive Monte Carlo Localization
AMCL is a probabilistic localization approach that uses a particle filter to estimate the vehicle's position based on sensor data.
Dead Reckoning
Dead reckoning estimates the vehicle's position by integrating motion sensor data over time. It is prone to accumulating errors, necessitating periodic corrections.