Skip to content

ijnek/dev_containers_ros1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dev Containers ROS 1

Github dev containers for the following ROS 1 distributions:

  • Melodic (base, core, desktop, desktop-full, perception, robot)
  • Noetic (base, core, desktop, desktop-full, perception, robot)

For the ROS 2 counterpart, see Dev Containers ROS 2.

Before you start

You must add to your host-machine's ~/.bashrc,

xhost +local:root > /dev/null  # Allows GUI in dev container to work

This lets you open GUI programs from within the dev-containers.

Instructions

  1. Clone this repository

  2. In VS Code, Click on Open Folder... [Ctrl+K Ctrl+O], and open one of the subdirectories that contain a .devcontainer folder. (eg. noetic-desktop)

  3. VS Code will bring up the dialog below, asking about opening the folder in a dev container. Click on Reopen in Container.

VS Code will then build the devcontainer. This takes some time the first time, but the second time should be much quicker.

If VS Code opens a dev container successfully, you now have ROS 1 (Noetic Desktop packages in this case) pre-installed, and ready to be used within that window. You can create a ROS 1 workspace and start developing!

If the build fails (it happens sometimes), open a GitHub Issue and post any available logs in it!

Using VSCode Extensions

To use the extensions you always use, go to the Extensions pane on the left side of the VS Code window, and click on the following button.

The installation of the extensions should be relatively quick, and you should be able to use them as usual.

Notes

Here is a list of notes explaining the reason for using the respective options in devcontainer.json.

In devcontainer.json:

  • runArgs
    • --privileged allows the container to access the host's resources, including hardware devices (eg. webcam) and GPU.
    • --network=host allows the container to share the host’s networking namespace, and the container does not get its own IP-address allocated. This is necessary for nodes inside the docker container to communicate to nodes on the same network but on a different machine.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published