Important
We recommend Ubuntu >= 22.04 + Python >= 3.10 + CUDA >= 12.3. You can create a mamba (or conda) environment before proceeding.
-
Install ROS2 Humble on your machine
-
Clone this repo and cd to the folder
git clone git@github.com:LeCAR-Lab/anycar.git cd anycar
-
Create a new mamba environment and activate it
mamba create -n anycar python=3.10 mamba activate anycar
-
Install python dependencies
pip install -r requirements.txt
-
Add the path of this project folder to your environment path
CAR_PATH
export CAR_PATH=$(pwd)
-
Add Python Path and Interpreter for ROS2 Compatibility
- get python path:
which python
- get python path to packages:
python -c "import site; print(site.getsitepackages()[0])"
export PYTHON_EXECUTABLE=PATH-OF-PYTHON export PYTHONPATH=PATH-OF-PYTHON-SITE-PACKAGES:$PYTHONPATH
- get python path:
-
Build the project
colcon build
-
Source the environment
source install/setup.bash
-
Download Foxglove Studio and import the visualization config from
misc/anycar-vis.json
- run foxglove node:
ros2 launch foxglove_bridge foxglove_bridge_launch.xml
- run car_sim node:
XLA_PYTHON_CLIENT_MEM_FRACTION=0.3 ros2 launch car_ros2 car_sim.launch.py
- Check the visualization in Foxglove Studio
localhost:8765
Expected to see:
For this example environment, we provide an example checkpoint. Please put folder under
car_foundation/car_foundation/models/
.
-
Data Collection
Please refer to car_collect/README.md for data collection. Run scripts in
car_collect
folder to collect data, the data will be automatically saved tocar_foundation/car_foundation/data
-
Model Training
Please refer to car_foundation/README.md for model training. Run scripts in
car_foundation
folder to train model, the model will be automatically saved tocar_foundation/car_foundation/models
-
Controller.
Please refer to car_dynamics/README.md for first-principle based dynamics model and sampling-based MPC implementation.
-
Deployment.
The deployment pipeline (sim/real) is implemented using ROS2, please refer to car_ros2/README.md for more details.
-
Hardware Setup
Please refer to hardware/README.md for our car configurations and 3d models.
@misc{xiao2024anycaranywherelearninguniversal,
title={AnyCar to Anywhere: Learning Universal Dynamics Model for Agile and Adaptive Mobility},
author={Wenli Xiao and Haoru Xue and Tony Tao and Dvij Kalaria and John M. Dolan and Guanya Shi},
year={2024},
eprint={2409.15783},
archivePrefix={arXiv},
primaryClass={cs.RO},
url={https://arxiv.org/abs/2409.15783},
}