VSCode ROS2 Workspace Template
This template will get you set up using ROS2 with VSCode as your IDE.
See how I develop with vscode and ros2 for a more in-depth look on how to use this workspace.
How to use this template
- Specify the repositories you want to include in your workspace in
src/ros2.repos
or deletesrc/ros2.repos
and develop directly within the workspace.- If you are using a
ros2.repos
file, import the contentsTerminal->Run Task..->import from workspace file
- If you are using a
- Install dependencies
Terminal->Run Task..->install dependencies
- Develop!
Style
ROS2-approved formatters are included in the IDE.
- c++ uncrustify; config from
ament_uncrustify
- python autopep8; vscode settings consistent with the style guide
Tasks
There are many pre-defined tasks, see .vscode/tasks.json
for a complete listing. Feel free to adjust them to suit your needs.
Take a look at how I develop using tasks for an idea on how I use tasks in my development.
Debugging
This template sets up debugging for python files and gdb for cpp programs. See .vscode/launch.json
for configuration details.
Continuous Integration
The template also comes with basic continuous integration set up. See .github/workflows/ros.yaml
.
To remove a linter just delete it's name from this line:
matrix:
linter: [cppcheck, cpplint, uncrustify, lint_cmake, xmllint, flake8, pep257]