Skip to content

sylarevan/docker-ros2-desktop-vnc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-ros2-desktop-vnc

Dockerfile to provide a ROS2 container with gazebo Fortress and VNC, based on Tiryoh/docker-ros2-desktop-vnc

Quick Start

Run the docker container and access with port 6080.
Change the shm-size value depending on the situation.

NOTE: --security-opt seccomp=unconfined flag is required to launch humble image. See Tiryoh/docker-ros2-desktop-vnc#56.

An example docker-compose.yaml is provided, e.g.

services:
  ros-desktop-vnc:
    image: sylar/ros2-desktop-vnc:humble
    ## seccomp profile must be deactivated for Ubuntu 22.04
    security_opt:
      - seccomp:unconfined
    shm_size: '512m'
    restart: unless-stopped
    container_name: ros2_desktop_vnc
    hostname: remotepc
    ## To solve some issue with VNC
    extra_hosts:
      - "remotepc:127.0.0.1"
    volumes:
      - /path/to/your/ws/src:/home/turtle/ros2_ws/src

Browse http://127.0.0.1:6080/.

Image from Gyazo

Make the container communicate with an external host

The image also includes zenoh-bridge-ros2dds. It allows the container to communicate with an external host (e.g. a robot), which is not always possible even in host mode (in particular with a Windows or macos host). Note that zenoh-bridge-ros2dds must also be installed on the robot.

Consider the robot has an IP address 192.168.0.10. On the robot, launch zenoh-bridge-ros2dds. Then you can connect the docker container to the robot trough the zenoh bridge by typing in a terminal inside the container: zenoh-bridge-ros2dds -e tcp/192.168.0.10:7447. Then, both hosts (the robot and the container) will communicate together through the bridge. Note that for that purpose, as indicated in zenoh-bridge-ros2dds documentation, ROS_LOCALHOST_ONLY environment variable has been set to 1 to make sure that NO DDS communication can occur between 2 hosts that are bridged by zenoh-bridge-ros2dds. This can be changed in the .bashrc file if needed.

Build

To build Docker image from this Dockerfile, run the following command.

  • humble
# using "docker buildx (multiarch)"
cd humble && docker buildx build --push --platform=linux/arm64,linux/amd64 --progress=plain -t sylar/ros2-desktop-vnc:humble .

Docker tags on hub.docker.com

Related projects

License

This repository is released under the Apache License 2.0, see LICENSE.
Unless attributed otherwise, everything in this repository is under the Apache License 2.0.

Acknowledgements

About

A ROS2 container with gazebo Fortress and VNC

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published