A comprehensive VS Code extension for ROS 2 developers, providing workspace management, build automation, code generation, debugging, real-time topic monitoring, and bag recording/playback.
⚠️ Pre-Release Notice: This extension is currently in alpha. Features are stable but may undergo changes based on user feedback.
If you find this extension useful, please consider giving it a star on GitHub! ⭐
Features
🔄 ROS 2 Workflows (New!)
- Automated Sequences: Chain together multiple tasks (launch files, nodes, commands, delays)
- Visual Editor: Drag-and-drop interface to configure and reorder steps
- Terminal Reuse: Run dependent steps in the same terminal to maintain context
- One-Click Execution: Run complex startup sequences with a single click
🏗️ Workspace Management
- Build System Integration: Execute
colcon build with customizable options
- Clean Build: Remove build artifacts (build/, install/, log/)
- Package Creation: Interactive wizard for creating ROS 2 packages (ament_cmake/ament_python)
- Node Generation: Generate C++ and Python node skeletons with automatic build file updates
- .gitignore Generation: Create ROS 2-specific .gitignore files
🚀 Run & Debug
- Launch File Discovery: Automatically find and list all launch files in your workspace
- Node Discovery: Scan workspace for executable nodes (C++ and Python)
- Run Configuration Wizard: GUI-driven creation of
launch.json configurations
- Debug Integration: Native VS Code debugging support for
ros2 launch and ros2 run
- Custom Environment Sourcing: Configure custom setup scripts for each configuration
📡 ROS 2 Topics
- Topic Listing: View all available ROS 2 topics with refresh capability
- Live Metadata: Display topic type, publishers, subscribers, frequency, and message count
- Topic Echo: Real-time message viewing in a dedicated panel
- Expandable Topics: Click to view detailed information inline
📦 ROS 2 Bag
- Record Bags: Interactive wizard to record bag files
- Custom file naming
- Directory selection
- Topic selection (all or specific topics)
- Play Bags: Playback wizard with advanced options
- Adjustable playback rate
- Loop mode
- Start paused, clock publishing, keyboard control options
🎨 User Interface
- Organized Sidebar: Four collapsible sections (Workspace, Run & Debug, Topics, Bag)
- Welcome Panel: Quick access to common tasks
- Integrated Terminals: All ROS 2 commands run in VS Code terminals
- Theme Icons: Consistent with VS Code's native look and feel
Installation
- Open VS Code
- Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
- Search for "ROS 2 Developer Tools"
- Click Install
Usage
Getting Started
- Open a ROS 2 workspace in VS Code
- Click the ROS 2 icon in the Activity Bar (left sidebar)
- Explore the sections: Workspace, Run & Debug, ROS 2 Topics, ROS 2 Bag, and Workflows
Automating with Workflows
- Expand "Workflows" section
- Click "Configure Workflows"
- Create a new workflow (e.g., "Full System Startup")
- Add steps:
- Source: Source your workspace
- Launch: Select package and launch file
- Run: Select package and node
- Command: Run any shell command
- Delay: Add wait time between steps
- Check "Run in previous terminal" to chain commands in one terminal
- Save and run from the sidebar!
Building Your Workspace
Option 1: Quick Build
- Click "Build" in the Workspace section
Option 2: Custom Build
- Use Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
- Run "ROS 2: Build Workspace"
- Select packages and options
Creating Packages and Nodes
Create a Package:
- Click "Create Package" in the Workspace section
- Enter package name
- Select build type (ament_cmake or ament_python)
- Add dependencies (optional)
Create a Node:
- Click "Create Node" in the Workspace section
- Select package
- Enter node name
- Choose language (C++ or Python)
Running Launch Files
- Expand "Run & Debug" → "Launch Files"
- Click on any launch file to run it
Creating Run Configurations
- Expand "Run & Debug" → "Nodes"
- Click on a node
- Configure source script (default: workspace setup.bash)
- Configuration is added to
.vscode/launch.json
Monitoring Topics
- Expand "ROS 2 Topics"
- Click refresh icon (top-right) to update topic list
- Expand any topic to view metadata
- Click "Click here to view messages" to open live echo panel
Recording and Playing Bags
Record:
- Click "Record New Bag" in ROS 2 Bag section
- Enter bag name
- Select output directory
- Choose topics (all or specific)
Play:
- Click "Play Bag" in ROS 2 Bag section
- Select bag directory
- Set playback rate (e.g., 1.0x, 2.0x)
- Choose loop mode
- Configure additional options
Requirements
- VS Code 1.104.0 or higher
- ROS 2 (Humble, Iron, Jazzy, or Rolling)
- colcon build tools
- Node.js and npm (for development)
Extension Settings
This extension contributes the following settings:
- Currently no configurable settings (all features work out-of-the-box)
Known Issues
Release Notes
See CHANGELOG.md for detailed release notes.
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
License
This extension is licensed under the MIT License.
Support
For issues, questions, or feature requests, please visit the GitHub repository.
Enjoy developing with ROS 2! 🤖
| |