This project includes VS Code dev container configurations for easy ROS2 development across different distributions.
- Docker installed and running
- VS Code with the "Dev Containers" extension installed
-
Choose ROS distribution:
- Press
Ctrl+Shift+Pand run "Tasks: Run Task" - Select "Setup Devcontainer (CPU Only)" or "Setup Devcontainer (GPU)" and follow prompts
- Press
-
Rebuild and open in container:
- Press
Ctrl+Shift+Pand run "Dev Containers: Rebuild and Reopen in Container" or the other variants - The container will automatically rebuild and reopen with your selected ROS version
- Press
- Workspace: Your code is mounted at
/deep_ros_ws - ROS sourcing: ROS is automatically sourced in your shell
- Build tools: Includes
colconandrosdepfor ROS development - Extensions: C++, CMake, Python, and XML support pre-installed
After using "Rebuild and Reopen in Container", you can stop containers using:
Method 1: VS Code Command (Recommended)
- Press
Ctrl+Shift+P(orCmd+Shift+Pon Mac) - Type:
Dev Containers: Reopen Folder Locally - This closes the container and returns to local mode
Method 2: Stop Container
- Press
Ctrl+Shift+P - Type:
Dev Containers: Stop Container - This stops the container but keeps it available for later use
Method 3: Using Docker Commands From a terminal (outside the container):
# List running containers
docker ps
# Stop a specific container by name
docker stop <container_name>
# Stop all dev containers
docker ps -q --filter "name=vsc-deep_ros" | xargs -r docker stop
# Stop and remove containers
docker stop <container_name>
docker rm <container_name>Method 4: Close VS Code Window
- Simply closing the VS Code window will stop the container when you exit
- The container will remain stopped until you reopen the folder in container mode
After stopping a container, you can restart it using:
Method 1: VS Code Command (Recommended)
- Press
Ctrl+Shift+P(orCmd+Shift+Pon Mac) - Type:
Dev Containers: Reopen in Container - This will start the existing container or create a new one if needed
Method 2: Rebuild and Reopen
- Press
Ctrl+Shift+P - Type:
Dev Containers: Rebuild and Reopen in Container - Use this if you want to rebuild the container from scratch (e.g., after Dockerfile changes)
Method 3: Using Docker Commands From a terminal (outside the container):
# List all containers (including stopped)
docker ps -a
# Start a stopped container by name
docker start <container_name>
# Start and attach to container
docker start <container_name>
docker attach <container_name>Method 4: Reopen Folder in VS Code
- If VS Code detects a devcontainer configuration, it will prompt you to "Reopen in Container"
- Click the notification or use the command palette option
Inside the container, you can do ros2 commands, colcon commands, rosdep, etc.
export IS_CI=1
colcon build
source install/setup.bash && colcon test
colcon test-result --verboseGPU backends are automatically skipped when IS_CI=1.
Requires: NVIDIA container with GPU access (Runtime Libraries and CuDNN) Testing with GPU can be done using one of the support GPU devcontainers.
export IS_CI=0 # or unset IS_CI
colcon build
source install/setup.bash && colcon test
colcon test-result --verboseGiven that access to GPU runners are limited, we settled on a testing procedure to test GPU-related software locally. The codebase is designed such that if a backend works with deep_sample, it works everywhere.
- CPU backends: Tested in CI automatically
- GPU backends: Must be tested locally with GPU before release
deep_samplevalidates all backend plugins end-to-end- Other packages tested with CPU only in CI