althack/vscode_ros2_workspace

A template for using VSCode as an IDE for ROS2 development.

What it solves

This project provides a standardized, ready-to-use development environment for ROS2 (Robot Operating System) projects. It eliminates the "it works on my machine" problem by using a containerized setup that ensures your local development environment and your Continuous Integration (CI) pipeline use the exact same configuration.

How it works

It uses VSCode's "Dev Containers" feature to create a consistent workspace. When you open the project, VSCode automatically builds a Docker container containing ROS2 and all necessary development tools. Because the configuration is stored in a single file (devcontainer.json), updating your ROS version or adding dependencies happens in one place, automatically syncing your local IDE environment with your automated testing environment.

Who it’s for

This template is designed for robotics developers who use ROS2 and want a professional, reproducible workflow. It is ideal for those who want to spend less time configuring build environments and more time writing code, while ensuring their project remains compatible with standard linting, formatting, and testing practices.

Highlights

  • Unified Environment: Uses the same container configuration for both local development and CI pipelines.
  • Pre-configured Tooling: Includes ROS2-approved formatters for C++ and Python, plus pre-defined tasks for building and testing.
  • Integrated Debugging: Comes with ready-to-use configurations for debugging Python files, C++ programs, and ROS launch files.
  • Flexible Setup: Supports optional features like GUI application forwarding (for X11 or WSL2) and NVIDIA/CUDA support for hardware-accelerated tasks.

Related

  • Project
  • Project
  • Project
  • Project