https://github.com/vaithak/f1tenth_shield_mppi
MPPI with Control Barrier Functions
https://github.com/vaithak/f1tenth_shield_mppi
Last synced: 4 months ago
JSON representation
MPPI with Control Barrier Functions
- Host: GitHub
- URL: https://github.com/vaithak/f1tenth_shield_mppi
- Owner: vaithak
- Created: 2025-05-01T07:02:56.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-05-11T21:21:38.000Z (5 months ago)
- Last Synced: 2025-05-20T14:17:26.404Z (5 months ago)
- Language: Python
- Homepage:
- Size: 7.22 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## MPPI with Control Barrier Functions (Shield MPPI) for F1Tenth car
### 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. 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 shield mppi 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
- **Shield MPPI-based controller:**
![]()
- MPPI with control barrier functions for following the raceline and avoiding obstacles.
- Local repair minimization step using CBFs is only done when the trajectory follows undesired behavior.
- Reference of Shield MPPI: https://arxiv.org/abs/2302.11719### Working demo on sim
[shield mppi](https://github.com/user-attachments/assets/b5d3f740-e091-4092-b12f-3779751e319c)### Working version on a real car
[](https://www.youtube.com/watch?v=V5UYKdPNC0Q)