A ROS2 Foxy (docker) setup with all the required dependencies for this project (and it will be updated on the go), coupled with Webots simulator R2022a in an Ubuntu 20.04 environment. The setup may work with or without GPU (follow the corresponding guidelines).
Install the following dependencies for your system:
git
,make
and docker- docker-compose
- docker-nvidia2 if on a GPU-accelerated system
- Xserver
After completing this section, you are able to run ROS2 and Webots in a docker container.
-
Run docker daemon and add yourself to docker group
sudo systemctl enable docker.service sudo systemctl start docker.service sudo usermod -aG docker $USER
-
Start the XServer:
-
Create a new workspace
ros_ws
and sourceros_ws/src
directorymkdir -p ~/ros_ws/src
-
Clone this repository to
ros_ws/src/docker
git clone https://github.com/alexandrosnic/ros2_webots_docker.git ~/ros_ws/src/docker
-
Run provisioning script
cd ~/ros_ws/src/docker make devel
-
Wait for the provisioning script to finish
-
Acces the environment from any terminal window
docker exec -it ccbts-devel bash