Skip to content

AutoDRIVE-Ecosystem/AutoDRIVE-F1TENTH-Sim-Racing

Repository files navigation

AutoDRIVE-F1TENTH Sim-Racing

AutoDRIVE-F1TENTH Sim-Racing

F1TENTH Digital Twin Autonomous Sim-Racing League using AutoDRIVE Ecosystem

Note

  • The setup has been only tested on the Ubuntu operating system.
  • It is assumed that Docker is installed.
  • It is assumed that if the Docker container is to take advantage of an NVIDIA GPU, the host machine has been properly configured by installing the necessary NVIDIA GPU drivers and the NVIDIA Container Toolkit.

AutoDRIVE Simulator Container

Build:

docker build --tag autodriveecosystem/autodrive_f1tenth_sim:v2024.1 -f autodrive_simulator.Dockerfile .

Run:

xhost local:root
docker run --name autodrive_f1tenth_sim --rm -it --network=host --ipc=host -v /tmp/.X11-unix:/tmp.X11-umix:rw --env DISPLAY --privileged --gpus all autodriveecosystem/autodrive_f1tenth_sim:v2024.1

Push:

  1. Run the image you created in the previous step inside a container:
xhost local:root
docker run --name autodrive_f1tenth_sim --rm -it --network=host --ipc=host -v /tmp/.X11-unix:/tmp.X11-umix:rw --env DISPLAY --privileged --gpus all autodriveecosystem/autodrive_f1tenth_sim:v2024.1
  1. In a new terminal window, list all containers and make a note of the desired CONTAINER ID:
docker ps -a
  1. Commit changes to Docker Hub:
docker commit -m "AutoDRIVE-F1TENTH-SimRacing" -a "AutoDRIVE Ecosystem" <CONTAINER ID> autodriveecosystem/autodrive_f1tenth_sim:v2024.1
  1. Login to Docker Hub:
docker login
  1. Push the container to Docker Hub, once done, you should be able to see your repository on Docker Hub:
docker push autodriveecosystem/autodrive_f1tenth_sim:v2024.1

AutoDRIVE Devkit Container

Build:

docker build --tag autodriveecosystem/autodrive_f1tenth_api:v2024.1 -f autodrive_devkit.Dockerfile .

Run:

xhost local:root
docker run --name autodrive_f1tenth_api --rm -it --network=host --ipc=host -v /tmp/.X11-unix:/tmp.X11-umix:rw --env DISPLAY --privileged --gpus all autodriveecosystem/autodrive_f1tenth_api:v2024.1

Push:

  1. Run the image you created in the previous step inside a container:
xhost local:root
docker run --name autodrive_f1tenth_api --rm -it --network=host --ipc=host -v /tmp/.X11-unix:/tmp.X11-umix:rw --env DISPLAY --privileged --gpus all autodriveecosystem/autodrive_f1tenth_api:v2024.1
  1. In a new terminal window, list all containers and make a note of the desired CONTAINER ID:
docker ps -a
  1. Commit changes to Docker Hub:
docker commit -m "AutoDRIVE-F1TENTH-SimRacing" -a "AutoDRIVE Ecosystem" <CONTAINER ID> autodriveecosystem/autodrive_f1tenth_api:v2024.1
  1. Login to Docker Hub:
docker login
  1. Push the container to Docker Hub, once done, you should be able to see your repository on Docker Hub:
docker push autodriveecosystem/autodrive_f1tenth_api:v2024.1

Generally Helpful Docker Tips

  1. To access the container while it is running, execute the following command in a new terminal window to start a new bash session inside the container:
docker exec -it <CONTAINER NAME> bash
  1. To exit the bash session(s), simply execute:
exit
  1. To kill the container, execute the following command:
docker kill <CONTAINER NAME>
  1. To remove the container, simply execute:
docker rm <CONTAINER NAME>
  1. Running or caching multiple docker images, containers, volumes, and networks can quickly consume a lot of disk space. Hence, it is always a good idea to frequently check docker disk utilization:
docker system df
  1. To avoid utilizing a lot of disk space, it is a good idea to frequently purge docker resources such as images, containers, volumes, and networks that are unused or dangling (i.e. not tagged or associated with a container). There are several ways with many options to achieve this, please refer to appropriate documentation. The easiest way (but a potentially dangerous one) is to use a single command to clean up all the docker resources (dangling or otherwise):
docker system prune -a

Citation

We encourage you to read and cite the following papers if you use any part of this project for your research:

@article{AutoDRIVE-Ecosystem-2023,
author = {Samak, Tanmay and Samak, Chinmay and Kandhasamy, Sivanathan and Krovi, Venkat and Xie, Ming},
title = {AutoDRIVE: A Comprehensive, Flexible and Integrated Digital Twin Ecosystem for Autonomous Driving Research &amp; Education},
journal = {Robotics},
volume = {12},
year = {2023},
number = {3},
article-number = {77},
url = {https://www.mdpi.com/2218-6581/12/3/77},
issn = {2218-6581},
doi = {10.3390/robotics12030077}
}

This work has been published in MDPI Robotics. The open-access publication can be found on MDPI.

@inproceedings{AutoDRIVE-Simulator-2021,
author = {Samak, Tanmay Vilas and Samak, Chinmay Vilas and Xie, Ming},
title = {AutoDRIVE Simulator: A Simulator for Scaled Autonomous Vehicle Research and Education},
year = {2021},
isbn = {9781450390453},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3483845.3483846},
doi = {10.1145/3483845.3483846},
booktitle = {2021 2nd International Conference on Control, Robotics and Intelligent System},
pages = {1–5},
numpages = {5},
location = {Qingdao, China},
series = {CCRIS'21}
}

This work has been published at 2021 International Conference on Control, Robotics and Intelligent System (CCRIS). The publication can be found on ACM Digital Library.