VSCode extension for navigating ROS 2 launch files. Provides Ctrl+Click navigation on node executables and included launch files.
- Ctrl+Click navigation on node executables (e.g.,
'my_node.py') to open source files - Ctrl+Click navigation on included launch files to open them
- Uses ROS 2's native
launchmodule for accurate analysis - Supports both source workspace and install space navigation
Download the latest release and install it with:
code --install-extension ros2-launch-navigator-<current-version>.vsixAlternatively, you can also build it from source:
# Build extension
docker run --rm -v "$(pwd)":/workspace -w /workspace node:20-bullseye \
bash -c 'npm ci && npm run compile && npx --yes @vscode/vsce package --allow-missing-repository --no-rewrite-relative-links'The extension needs to know about your ROS 2 setup scripts. Therefore, some configuration is required: Configure ROS 2 setup scripts using commands:
- Open Command Palette (
Ctrl+Shift+P) - Run: "ROS Launch Linker: Add Setup Script"
- Select your ROS 2
setup.bash(e.g.,/opt/ros/jazzy/setup.bash) - Also add your workspace
setup.bashfiles (e.g.,/home/user/ros2_ws/install/setup.bash)
Or use: "ROS Launch Linker: Add Common Setup Scripts" to add the base ROS setup scripts.
- Open a
.launch.pyfile - Ctrl+Click on node executable names (e.g.,
'dummy_node.py') - Navigate to the source file
ROS Launch Linker: Add Setup Script- Add ROS 2 setup script pathROS Launch Linker: Remove Setup Script- Remove setup scriptROS Launch Linker: Manage Setup Scripts- Interactive managementROS Launch Linker: Add Common Setup Scripts- Quick-add common scriptsROS Launch Linker: Toggle Prioritize Source- Switch between source/install paths
{
"rosLaunchLinker.setupScripts": [
"/opt/ros/jazzy/setup.bash",
"~/ros2_ws/install/setup.bash"
],
"rosLaunchLinker.prioritizeSource": true
}- Extension activates when opening
.launch.pyfiles - Calls Python analyzer using ROS 2's
launchmodule - Analyzer extracts node executables and launch file paths
- Extension creates clickable links in VSCode
- Ctrl+Click navigates to source or install files
src/
├── extension.ts # Entry point
├── commands/
│ └── setupScriptCommands.ts # Setup script commands
├── providers/
│ └── rosLaunchLinkProvider.ts # Document link provider
└── analyzer/
├── analyze_launch.py # Python analyzer
└── launchAnalyzer.ts # TypeScript wrapper
# Python tests
pytest test/python/ -v
# TypeScript tests
npm run compile && npm test
# Docker tests (full ROS 2 environment)
./run-docker-tests.shSee RUNNING_TESTS.md for details.
# Clone
git clone <repository-url>
cd ros2-launch-navigator
# Install dependencies
npm install
# Compile
npm run compile
# Run tests
npm test
pytest test/python/
# Package
docker run --rm -v "$(pwd)":/workspace -w /workspace node:20-bullseye \
bash -c 'npm ci && npm run compile && npx --yes @vscode/vsce package --allow-missing-repository --no-rewrite-relative-links'Current version: 0.3.1
