Sign inSign up

yuanboshe/ros2

By yuanboshe

•Updated over 1 year ago

ROS2 image with code-server and novnc desktop.

Image
Developer tools
Operating systems
0

1.1K

yuanboshe/ros2 repository overview

⁠Quick Start with ROS2 Humble in a Container

If you prefer not to go through the hassle of setting up ROS, using a container for ROS2 development is an excellent choice. This repository shares a ROS2 Humble container, which has a development environment already configured. With one command, you can deploy it and quickly get started with ROS2 development using ros2_ws.

⁠Overview

This container image includes:

  • A WEB desktop accessible through a browser, mainly for remote development convenience.
  • WEB-based VSCode accessible through a browser, eliminating the need to install VSCode locally.
  • A pre-configured ROS2 Humble development environment, including solutions for accessing the internet in regions with restrictions, without the need for additional tools.

⁠Deployment

Prerequisites: Docker installed on your computer.

Deployment command:

docker run -d --restart always --env DISPLAY=:8 -p 8081:8081 -p 8082:8082 -p 8083:22 --name ros2 yuanboshe/ros-humble-aicrobo

Explanation:

  • Port 8081 is for the WEB desktop, accessed via http://:8081.
  • Port 8082 is for WEB-based VSCode, accessed via https://:8082.
  • Port 22 is for SSH remote access.
  • Port 5900 is for VNC access, generally not needed with the WEB desktop.
  • ":8" is the display screen number for the WEB desktop, ensuring the default GUI displays there.

After deploying with the above command, you can start remote development through a browser.

Note: Data within the container will be reset upon container destruction. To preserve data, you can mount the home directory to your host machine. For example:

mkdir -p /data/local-humble
docker run -d --restart always --env DISPLAY=:8 -p 8081:8081 -p 8082:8082 -p 8083:22 -v /data/local-humble:/home/aicrobo --name ros2 yuanboshe/ros-humble-aicrobo

⁠Basic Usage

Note: The access password for both the IDE and the desktop is "aicrobo".

⁠WEB-based VSCode

Access via port 8082, e.g., https://192.168.3.49:8082⁠

VSCode Access

The IDE can be used for web development and many server management functions, such as terminal access and file management.

The image shows a terminal opened to launch the ROS2 graphical tool command rqt, displaying the GUI on the desktop.

⁠WEB Desktop

Access via port 8081, e.g., http://192.168.3.49:8081⁠

Desktop Access

The desktop page should be used primarily for display purposes, as operations like copying and pasting can be cumbersome, and the container is optimized for minimal size with a basic desktop environment.

The image shows the rqt GUI launched from the IDE page.

⁠Enabling SSH Service

Open a remote terminal and enter sudo service ssh start. (This needs to be done after each "reboot", as it's off by default)

The default system username and password are both "aicrobo".

⁠"Rebooting" the System

Enter the command killall5 to "reboot" the container system.

⁠Additional Notes

Many user settings in the container are stored in the home directory. Mounting this directory will preserve your default configurations even after container destruction. Place any data you wish to keep in the home directory. There are many other ways to use this container, which you can explore on your own.

Tag summary

Content type

Image

Digest

sha256:b3e644fae…

Size

2.9 GB

Last updated

over 1 year ago

docker pull yuanboshe/ros2:humble-aicrobo-latest