Tasks for ROS2 workflow in Visual Studio Code (Windows, Linux).
Obviously required:
VSCode extensions:
- ROS (VS Marketplace, Github)
- ROS2 Ament Task Provider (cite, VS Marketplace, Github)
- Tasks Shell Input (VS Marketplace, Github)
- multi-command (VS Marketplace, Github)
Colcon extensions:
Task (clickable) | Description |
---|---|
Colcon | |
colcon: build |
Build workspace |
colcon: build --packages-select |
Build only single package from workspace |
colcon: build --clean-first |
Remove CMake cache and build workspace |
colcon: build --packages-select --clean-first |
Remove CMake cache and build only single package from workspace |
colcon: build --packages-up-to |
Build selected package including its dependencies |
colcon: build --packages-above |
Rebuild packages which depend on a specific package |
colcon: build --packages-above-and-dependencies |
Rebuild packages and its recursive dependencies |
colcon: test |
Test workspace |
colcon: test --packages-select |
Test only single package from workspace |
colcon: clean |
Clean workspace |
colcon: clean --packages-select |
Clean package workspaces |
ROS2 | |
ros2: Create ament_cmake package |
Create a new ROS C++ package from a template |
ros2: Create ament_python package |
Create a new ROS Python package from a template |
rqt_graph |
Run rqt_grph tool |
Linter | |
uncrustify |
Lint files with uncrustify |
cpplint |
Lint files with cpplint |
cppcheck |
Run static code checker cppcheck |
lint_cmake |
Run lint on cmake files |
flake8 |
Run flake8 on Python files |
pep257 |
Run pep257 on python files |
xmllint |
Run xmllint on xml files |
lint all |
Run all linters |
Build tasks run with command "Tasks: Run Build Task" (default hotkey Ctrl+Shift+B
).
All tasks (include build) run with command "Tasks: Run Tasks" (default hotkey is not defined). You may set convenient hotkey, e.g. Alt+T
.
- Repository vscode_ros2_workspace
- Repository vscode-ros
- YouTube playlist Visual Studio Code ROS Extension
- Repository ros2_with_vscode