Enabling VRX Gazebo Sim in Docker (Work in Progress) - ArcturusNavigation/all_seaing_vehicle GitHub Wiki
As of today (08/03/2025), the VRX simulation environment only supports Ubuntu installations of ROS 2 and Gazebo. This tutorial page is an ongoing effort to set up the the VRX simulation environment for the docker installation.
Prerequisite Installation
These are build commands that will eventually all be incorporated into the Dockerfile and pushed to the docker image. Since we are running these commands in the docker container, they are not persistent and will have to be ran for every docker compose up
.
Open up the docker terminal with docker compose exec arcturus bash
.
Install the necessary packages:
sudo apt update
sudo apt install lsb-release wget gnupg
sudo wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
sudo apt update
sudo apt install -y ros-humble-xacro ros-humble-tf-transformations python3-sdformat13 gz-garden
In the native installation, the packageros-humble-ros-gzgarden
is also installed. However, the package does not exist (for ARM architectures?) so we follow the github instructions to compile it from source with the following commands.
# Set gazebo version
export GZ_VERSION=garden
# Setup the workspace
mkdir -p ~/ros_gz/src
cd ~/ros_gz/src
# Download needed software
git clone https://github.com/gazebosim/ros_gz.git -b humble
cd ~/ros_gz
rosdep install -r --from-paths src -i -y --rosdistro humble
# Source ROS distro's setup.bash
source /opt/ros/humble/setup.bash
# Build and install into workspace
cd ~/ros_gz
colcon build
If the colcon build fails with the error c++: fatal error: Killed signal terminated program cc1plus
, this means building the C++ files is taking too much memory. Try reducing the memory usage by running the colcon build command like this instead:
export MAKEFLAGS="-j 1"
colcon build --parallel-workers=1 --executor sequential
Running the simulation
Go to noVNC at localhost:6080/vnc.html?resize=remote
. The docker VRX environment lacks a GUI, so we need to use noVNC to virtually open rviz. Open a new terminal by right clicking the background and selecting Terminal.
To start the simulation (remember to source your setup.bash files!), run the command
ros2 launch all_seaing_bringup sim.launch.py no_gui:=true
At this point, you should see the keyboard popup window and RViz appear on the screen.