ros2_docker

「Ubuntu + ROS2 」を含むDocker環境を提供します.
Provides a Docker environment including "Ubuntu + ROS2".

Prerequisites

Quick Start

Run the docker container. Add the --rm option depending on the situation.
※ If you do not want to save your changes, it is recommended to use the --rm option.

  • use gpu
xhost +local:
./run_gpu.sh
  • without gpu
./run.sh

After the second

launch (Rename containers as necessary)


xhost +local:
docker start my-<branch name>

login

./login.sh

close (Rename containers as necessary)


docker stop my-<branch name>

File sharing (hotst <---> docker)

The folder ~/ros2_docker/docker_share on the host PC and the folder ~/host_files on docker are bind-mounted.
You can communicate in both directions. However, if something in the folder is deleted, it will be reflected in both. Screenshot from 2023-10-14 21-36-14

Default config files

.bashrc

The commands are introduced below.

  • rs : cd ~/ros2_ws/src
  • bashrc : source ~/.bashrc
  • ros_make : colcon build --symlink-install is executed no matter what directory you are in

.vimrc

  • set number

Build (option)

If you want to customize .bashrc or .vimrc, please change the files in config/.
After the change, execute the following command.
※ We recommend replacing files with file sharing.

./build.sh

※ In this case, it is necessary to change the image used in run.sh

Details of each branch

writing

Docker tags on hub.docker.com

dockerhub

Related Projects

License

BSD

Tested on ...

  • ubuntu 20.04 LTS