Skip to content

Luckydogroy/openpilot-sim-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

openpilot-sim-docker

1. Installing Docker

Instructions

  1. Update your package index:

    sudo apt-get update
  2. Install necessary packages:

    sudo apt-get install \
        ca-certificates \
        curl \
        gnupg \
        lsb-release
  3. Add Docker's official GPG key:

    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
  4. Set up the stable repository:

    echo \
      "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
      $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  5. Update the package index again:

    sudo apt-get update
  6. Install Docker Engine:

    sudo apt-get install docker-ce docker-ce-cli containerd.io
  7. Verify the Docker installation:

    sudo docker run hello-world

2. Installing Nvidia-Docker-Container

Prerequisites

  • Docker installed (see above)
  • NVIDIA driver installed on your system

Instructions

  1. Add the package repositories:

    distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
    curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
    curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
    sudo apt-get update
  2. Install the nvidia-docker2 package:

    sudo apt-get install -y nvidia-docker2
  3. Restart the Docker daemon to complete the installation:

    sudo systemctl restart docker
  4. Test the installation with a CUDA container:

    sudo docker run --rm --gpus all nvidia/cuda:11.0-base nvidia-smi

3. Pull the dockerfile

docker pull luckydogry/openpilot:1.0

4. Run the simulation

Instructions

  1. Start the CARLA simulator(0.9.13) by downloading and running the simulator:
./CarlaUE4.sh
  1. Start the docker by running:
./launch_openpilot_docker.sh
  1. Launch the openpilot by running the following command inside the docker:
cd /home/batman/openpilot/tools/sim && ./launch_openpilot.sh
  1. Launchu the openpilot_bridge by running:
docker exec openpilot_client /bin/bash -c 'cd /home/batman/openpilot/tools/sim && ./bridge.py --town {town} --spawn_location  \'{location}\' --auto-engage >/dev/null \'&"

The location and town parameters should be formatted as '147,-371,2,0,0,0', "Town04."

  1. Wait for 10 seconds, and the simulation should start.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages