Skip to content

SIGVerse/docker-ros

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 

Repository files navigation

docker-ros

This repository provides an Ubuntu desktop Docker container (with VNC access) for SIGVerse.
It uses the following image:
https://github.com/Tiryoh/docker-ros2-desktop-vnc

Build and publish the Docker image

This procedure is for SIGVerse administrators. Users do not need to run it.

We do not provide a Dockerfile. Setting up the environment as ubuntu during docker build was difficult.

  1. Install Docker Desktop:
    https://www.docker.com/products/docker-desktop/
  2. Start Docker Desktop and make sure it is running.
  3. Open Windows PowerShell.
  4. Run the version command to confirm that the docker command works:
    docker --version
  5. Sign in to Inamura Lab's Docker Hub account with docker login. (ID=inamuralab / password: confirm separately)
    docker login
  6. Pull the base image, then create and start a container:
    docker run -p 6080:80 --security-opt seccomp=unconfined --shm-size=512m ghcr.io/tiryoh/ros2-desktop-vnc:humble
  7. Wait until the container is ready. If it looks like the following, startup is complete:
    launch-base-image
  8. In Docker Desktop, confirm that the container appears in Containers. The container name is generated randomly.
    base-image-container
  9. Open a web browser and go to:
    http://127.0.0.1:6080/
  10. Click the connect button.
    The Ubuntu desktop will appear.
    A VNC tool panel is available on the left side of the screen.
  11. On the desktop, start Terminator.
  12. Install SIGVerse:
    wget https://raw.githubusercontent.com/SIGVerse/docker-ros/main/humble/sigverse_setup.sh
    chmod +x sigverse_setup.sh
    ./sigverse_setup.sh
  13. Remove unnecessary files:
    rm sigverse_setup.sh
    sudo rm -rf /var/lib/apt/lists/*
  14. Download sigverse_commands.txt:
    wget https://raw.githubusercontent.com/SIGVerse/docker-ros/refs/heads/main/humble/sigverse_commands.txt
  15. Copy sigverse_commands.txt to the desktop.
  16. Confirm that the ROS 2 node for HSR starts:
    source ~/.bashrc
    ros2 launch sigverse_hsr_teleop_key teleop_key_launch.xml
  17. Use the VNC tool panel on the left to disconnect the VNC session.
  18. In Docker Desktop, stop the base image container.
  19. Commit the container and publish the image to Docker Hub.
    Run the following commands in Windows PowerShell.
    Replace <Container ID> with the Container ID shown in Docker Desktop, and update the version number as needed.
    docker commit <Container ID> sigverse-ros2-humble:1.0
    docker tag sigverse-ros2-humble:1.0 inamuralab/sigverse-ros2-humble:1.0
    docker login
    docker push inamuralab/sigverse-ros2-humble:1.0

Start the Docker container (first time)

  1. Install Docker Desktop (if it is not installed):
    https://www.docker.com/products/docker-desktop/
  2. Start Docker Desktop and make sure it is running.
  3. Open Windows PowerShell. (Run the following commands in Windows PowerShell.)
  4. Pull the image, then create and start a container.
    You can change the resolution by adding a resolution option (e.g., -e RESOLUTION=1920x1080).
    docker run -p 6080:80 -p 9090:9090 -p 50001:50001 inamuralab/sigverse-ros2-humble:1.0
  5. Wait until the container is ready. If it looks like the following, startup is complete:
    launch-image
  6. In Docker Desktop, confirm that the image appears in Images.
    docker-desktop-images
  7. In Docker Desktop, confirm that the container appears in Containers. The container name is generated randomly.
    docker-desktop-containers

Start the Docker container (second time and later)

Since the container already exists, you can start it from the container list in Docker Desktop.

Use the Docker container

  1. Open a web browser and go to:
    http://127.0.0.1:6080/
  2. Click the connect button.
    The Ubuntu desktop will appear.
    A VNC tool panel is available on the left side of the screen.
    On the desktop, sigverse_commands.txt is available and contains command examples.
    vnc-desktop
  3. In Unity, set the IP address for ROS to 127.0.0.1.
    unity-settings

Stop the Docker container

  1. Use the VNC tool panel on the left to disconnect the VNC session.
  2. In Docker Desktop, stop the container.

Notes

Saving the Docker image to a file

On Windows, run the following commands in PowerShell to save and load a Docker image file.

Save to a file:

docker save inamuralab/sigverse-ros2-humble:1.0 -o docker-image-sigverse-humble.tar

Load from a file:

docker load -i docker-image-sigverse-humble.tar
docker run -p 6080:80 -p 9090:9090 -p 50001:50001 inamuralab/sigverse-ros2-humble:1.0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages