A simple way to run ROS1 Noetic for DEVELOPMENT using https://containers.dev/
This repo contains a simple way to delevop locally in a ROS1 Noetic docker container using the VScode devcontainers.
A development container
(or dev container for short) allows you to use a container as a full-featured development environment. It can be used to run an application, to separate tools, libraries, or runtimes needed for working with a codebase, and to aid in continuous integration and testing.
Details of the services in this container
- ROS1 noetic with a base workspace
/home/ubuntu/ros_ws/
; - Support for arm64 (jetson orin nano) and amd64 architectures;
- Support for NVIDIA Docker runtime for linux hosts;
- VNC server that allows direct browser access (http://localhost:3080/), so nothing is required to install and use it;
- A
ssh
server, to allow direct access from outside (ssh ubuntu@localhost -p 3022
); - A web
vscode
server for easy remote access when deploying it on the robot (http://localhost:3081/); - Automatic
xcode +
command executed on each attachment for local X forwarding; - Custom environment and VScode configurations:
- Open split terminals on launch;
- Setup all environments variables automatically for running ROS;
- Automatically open the VNC interface in a ROS tab;
- Custom .vscode tasks to deploy roscore/rviz;
- Custom PS1 (terminal shell);
Recommended for local development, with X11 sharing, etc.
git clone git@github.com:verlab/ros1_devcontainer_docker_compose.git
- Verify the compose file used in the container used in
.devcontainer/devcontaoiner.json
, given your operative system:"dockerComposeFile": [ "../compose_linux_host.yaml" ],
- Can also be
../compose_macos_host.yaml
if you use MacOS
- Can also be
- Open folder with VScode using the dev containers plugin (https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
control + shift + p
- Write
Dev Containers: Reopen in Container
orDev Containers: Rebuild and Reopen in Container
Recommended for remote development, as for example, deploying a dev machine on the robot.
git clone git@github.com:verlab/ros1_devcontainer_docker_compose.git
cd ros1_devcontainer_docker_compose
BUILDKIT_PROGRESS=plain docker compose -f compose_jetson_host.yaml up --build
BUILDKIT_PROGRESS=plain
helps to visualize step by step output of each of the commands.
Once the container is up, the you can access the services via:
- VNC: http://localhost:3080
- VScode: http://localhost:3081
- SSH:
ssh ubuntu@localhost -p 3022
- user:
ubuntu
- pass:
ubuntu
- user:
- The live preview opens a terminal with a message "cannot find shell for command XXXX". This can be safely ignored.
- The live preview will show a small box with a message "Please reopen the preview". This is fixed in the newest version of the live preview plugin.
- https://www.youtube.com/watch?v=dihfA7Ol6Mw
- https://github.com/Tiryoh/docker-ros-desktop-vnc/
- https://github.com/atinfinity/nvidia-egl-desktop-ros2/
- https://www.reddit.com/r/ROS/comments/1gsoebe/dev_using_docker_containers/
- https://github.com/elkuno213/ros2-ws-template
- https://github.com/devrt/ros-devcontainer-vscode/
MIT
Free Software, Hell Yeah!