Docker environment running Ubuntu 22.04 with ROS 2 Humble and Python dependencies.
Used for software development for Wisconsin Robotics.
Install WSL2 if on Windows.
IMPORTANT: All terminal commands should run in the WSL terminal on Windows.
Install and configure Git, then generate an SSH key for GitHub (see Git and CI/CD training).
Install Docker Desktop on Windows or Docker Desktop on Mac.
Install make on Windows in a (WSL) terminal:
sudo apt update && sudo apt install -y makeInstall make on Mac by installing Xcode Command Line Tools.
Create a workspace directory.
Enter the workspace directory, then clone this repository.
git clone git@github.com:WisconsinRobotics/WRoverSoftware_Docker.git
Set it as a safe directory for Git.
git config --global --add safe.directory /root/workspace/WRoverSoftware_Docker
Open a terminal in this directory and enter:
docker build -t wrover .If running into permission issues, see this post.
Once the Docker image has been built, it does not need to be rebuilt every time.
Rebuild only when
Dockerfileorrequirements.txtchanges.To run, open a terminal in this directory and enter:
make run
To exit, enter
exitin the same terminal.
Run the docker container.
Inside the docker container, clone the repo into the workspace directory.
Download VS Code.
Run
code .in the workspace.Install the Dev Containers VS Code extension.
Run the container in a separate terminal and attach the container through the extension by clicking the right arrow next to the
wrovercontainer underDev Containers.To disconnect, click the bottom left corner, click
Close Remote Connection, then shut down the container.
Add the python package(s) in
requirements.txt, one package per line.For consistency, it's best to specify the package version, for example,
depthai==3.1.0.After adding the package(s), rebuild the Docker container:
docker build -t wrover .To push changes, open a PR (see Git and CI/CD training).



