Based on docker-ubuntu-vnc-desktop project with ROS 2 packages installed the same way, as in official OSRF ROS 2 Docker images.
This container initiates vnc server that allows remote access using graphical user interface. HTML VNC Client is than used to allow for easy access in web browser.
Container creates separate graphical (Ubuntu LXDE/LxQT) and user environment, so no user files nor any applications launched on host will be accessible via VNC.
The repository contains GitHub Actions workflows for automatic build & deployment to this Docker Hub repo, but you can also build it locally:
docker buildx build \
--platform linux/amd64 \
--build-arg DOCKER_TAG=focal \
-t husarion/ros2-desktop-vnc:amd64 \
.
docker buildx build \
--platform linux/arm64 \
--build-arg DOCKER_TAG=focal-arm64 \
-t husarion/ros2-desktop-vnc:arm64 \
.
Connect RPLIDAR to your laptop and...
- Start all containers:
cd examples/rplidar
docker-compsoe pull
docker-compose up
-
In the web browser open url: http://localhost:6080/
-
In the virtual desktop open LXTerminal from desktop shortcut
-
In the
LXTerminal
type:
ros2 run rviz2 rviz2
- Get your Husarnet JoinCode
Before running example with Husarnet get your JoinCode, that you will use to connect Docker containers to the same P2P VPN network.
You will find your JoinCode at https://app.husarnet.com
-> Click on the desired network
-> Add element
button
-> Join code
tab
…and change the JOINCODE
variable in the .env
file located in examples/husarnet
folder.
Additional information about Husarnet can be found here: https://husarnet.com/docs/begin-linux.
- Start all containers:
cd husarion/rplidar
docker-compsoe pull
docker-compose up
-
In the web browser open url: [<ip-v6-from-husarnet-network>]:6080/ (remember about square brackets around ipv6 address).
-
In the virtual desktop open LXTerminal from desktop shortcut.
-
In the
LXTerminal
type:
ros2 run rviz2 rviz2