/devcontainer-ros2

VSCode Dev Container for ROS2

MIT LicenseMIT

devcontainer-ros2

pre-commit.ci status Release Drafter Mirror release to humble

  • If you work on multiple projects, clone this repo with a project name instead of the default. Example:
    • git clone --recursive https://github.com/NathanaelGandhi/devcontainer-ros2.git <my-project>
  • Feel free to add 0-unlimited ros2_ws(s)/packages or whatever else you like into this devcontainer,
    it can act as a ws or just a dir, it is up to you

Recommendations:

Extra Notes:

  • You are responsible for sourcing ROS2 in every new shell:
    • source /opt/ros/humble/setup.$(basename $SHELL) && source install/local_setup.$(basename $SHELL)
    • Helpful envs are provided through direnv. See config in .envrc
      Source target Shell agnostic bash zsh
      ROS2 $sr $bsr $zsr
      colcon $sc $bsc $zsc
      local colcon $slc $bslc $zslc
  • The devcontainer will update and install rosdeps post creation
  • The devcontainer targets the latest dev image that you can build from the containers-ros2 submodule
  • c_cpp_properties.json recursively includes from the vscode workspace dir
    • this is a good reason to NOT store separate source and ros_ws(s) under this dir, IntelliSense will hate you
  • There are vscode tasks to clean, build and test
  • All files that were not cloned from this repo are ignored by git. See .gitignore