/ros

Defines docker image for Autonomous Systems Design lab course at University of Esslingen

Primary LanguageShellMIT LicenseMIT

ROS Docker Image

gokhlayeh/ros Build pre-commit.ci status

A ROS enabled Docker image, used in Autonomous Systems Design Laboratory at University of Esslingen. The image created here is used as base-image for devcontainers in asd-docker-template of the Autonomous Systems Design course. Its main purpose is to facilitate building of ROS packages via catkin and running simulations in gazebo. Graphical UI elements, such as rviz, are made available through a virtual desktop, hosting a VNC and noVNC endpoint.

Features

Usage

While the image can be used to run a standalone ROS application, its actual purpose lies in being utilized as vscode devcontainer. For Dockerfiles, simply point to gokhlayeh/ros:latest in the FROM directive.

Dockerfile

Take the following code and put in your Dockerfile. You can customize the setup further if you wish.

FROM gokhlayeh/ros:latest

# ...

Devcontainer Config

If you develop a ROS package named my-package, start with the following devcontainer.json file. It will automatically mount your package in a designated workspace and install any dependencies marked <exec_depend> through rosdep.

{
  "name": "ROS devcontainer for vscode",
  "dockerFile": "Dockerfile",
  "workspaceMount": "source=${localWorkspaceFolder},target=/workspace/src/my-package,type=bind,consistency=delegated",
  "workspaceFolder": "/workspace/src/my-package",
  "remoteUser": "vscode",
  "postCreateCommand": "rosdep update && sudo apt-get update && rosdep install --from-paths --ignore-src .. -y -r",
  "runArgs": ["--init", "--security-opt", "seccomp=unconfined"],
  "forwardPorts": [6080, 5901],
  "overrideCommand": false,
}