Devcontainer 101
Purpose
This document explains how to open the project in a dev container using Visual Studio Code on Ubuntu. The project already includes a .devcontainer folder with the required config under roscon_de_2025_navigation_workshop/dev_container.
Prerequisites
Docker installed and running on Ubuntu:
sudo apt update sudo apt install docker.io sudo usermod -aG docker $USER # log out and back in after this
Visual Studio Code installed.
VS Code extension Dev Containers installed.
Inside the devcontainer.json, change the value of the <ip-address> placeholder in the
ROS_DISCOVERY_SERVERenvironment variable to the IP address and <domain-id> placeholder to theROS_DOMAIN_IDof the TurtleBot4 you want to connect to.
Starting the Dev Container
Follow one of the two methods below.
Method A: Using the VS Code Popup (Click-Based)
Open the project folder in VS Code: - File → Open Folder… - Select the folder that contains .devcontainer/.
VS Code will detect the dev container configuration and show a popup in the bottom-right corner saying: “Folder contains a Dev Container configuration”.
Click the button: “Reopen in Container”.
VS Code will build the container and reopen the window inside it.
Open a terminal: - Terminal → New Terminal The terminal now runs inside the dev container.
You can choose not to use vscode terminal. You can run the following command in your local terminal to exec into the devcontainer: .. code-block:: bash
docker exec -it kilted_dev_container bash
Method B: Using the Command Palette
Open the project folder in VS Code.
Press Ctrl+Shift+P to open the Command Palette.
Run:
Dev Containers: Reopen in ContainerAfter the rebuild/open process completes, open a terminal: - Terminal → New Terminal
You are now ready to work inside the dev container.