Real-time probabilistic inference-based motion planning for autonomous driving with MPPI (Model Predictive Path Integral). For more information 随机轨迹优化方法入门:以MPPI为例
- CMake >= 3.20
- C++17 compatible compiler
- CUDA Toolkit (compute capability 7.5+). You can download it from NVIDIA CUDA Toolkit.
- Eigen3 - Linear algebra library
- spdlog - Fast C++ logging library
- yaml-cpp - YAML parser and emitter
- Protobuf - Protocol buffers for data serialization
Tested on WSL2 Ubuntu 22.04🐧
git clone https://github.com/your-username/mppi-in-autonomous-driving.git
cd mppi-in-autonomous-drivingcmake -S . -B build
cmake --build build -j$(nproc)After compilation, the executable file planning_node will be generated in the build folder. Specify a parameter configuration file for it to start the program.
./build/planning_node --config ./config/default.yamlBefore viewing the visualization results, you need to manually load the layout file from assets/mppi_layout.json and install the extension from foxglove-gauge-extension.
The system publishes planning and simulation data via Foxglove WebSocket. Open Foxglove Studio and connect to ws://localhost:8765 to online real-time visualize. Additionally, if the save_mcap option is set to true in the configuration file, the simulation data will be saved in the log folder for offline viewing. For information on using Foxglove, please refer to its official documentation Foxglove Docs.
Here are some quick demos🎬.
lane_change.mp4
merge.mp4
turn_left_1.mp4
turn_left_2.mp4
MPPI-Generic provides the C++/CUDA library for GPU-accelerated stochastic trajectory optimization, foxglove-sdk provides visualization and data playback, and CommonRoad for simulation interface.
