kompass-sim provides ready-to-use simulation and testing environments for 2D robot navigation, fully integrated with Kompass stack. This repository is created for rapid testing, visualization, and validation of autonomous navigation algorithms.
cd ~/ros2_ws/src
git clone https://github.com/automatika-robotics/kompass-sim.git- If you're using
rosdepfor the first time:
sudo rosdep init
rosdep update- Then install the required dependencies:
rosdep install --from-paths src -y --ignore-srccd ~/ros2_ws
colcon build
source install/setup.bashLaunch a simulation environment (e.g., TurtleBot3 in Webots):
ros2 launch kompass_sim webots_turtlebot3.launch.pyThis brings up the robot in a Webots, ready to be controlled by Kompass (see KOmpass quick start instructions).
If you don't have ROS 2 installed, you can run the simulation from a prebuilt
container instead. The image is based on ROS 2 Jazzy, contains this package
and all of its dependencies, and already ships Webots inside it. The default command runs the quick-start launch file above (webots_turtlebot3.launch.py).
The container is meant to be run with:
--network host, so a Kompass/EMOS stack running outside the container (on the host or another machine) can discover and talk to the simulation over DDS, and- access to the host's X server and GPU, so the Webots and RViz windows show up on your screen.
Pull the prebuilt image from Automatika's registry:
docker pull automatika/kompass-sim:jazzy…or build it locally from the repository root:
docker build -t automatika/kompass-sim:jazzy .Run this once per login session on the host:
xhost +local:rootdocker run -it --rm \
--network host \
--ipc host \
--env DISPLAY="$DISPLAY" \
--env QT_X11_NO_MITSHM=1 \
--volume /tmp/.X11-unix:/tmp/.X11-unix:rw \
--device /dev/dri:/dev/dri \
automatika/kompass-sim:jazzyThis starts Webots + the robot driver + localization + RViz, exactly like the native quick start. Kompass running on the host can now be pointed at the simulation.
Notes
- NVIDIA GPUs: install the
NVIDIA Container Toolkit
and add
--gpus all --env NVIDIA_DRIVER_CAPABILITIES=allto thedocker runcommand (you can drop--device /dev/driin that case). - Talking to Kompass/EMOS: with
--network hostdiscovery happens onlocalhost. Make sure both sides share the sameROS_DOMAIN_ID(add--env ROS_DOMAIN_ID=<id>if you set one on the host) and the sameRMW_IMPLEMENTATION. - Simpler privileges: if the X11/device flags above are inconvenient, adding
--privilegedis a coarser alternative that also gives the container display access. - Run something else: append any command to override the default launch, e.g.
docker run ... automatika/kompass-sim:jazzy bashfor a shell, or... ros2 launch kompass_sim webots_turtlebot3_rgbd.launch.py.
- kompass – Event-driven, eay-to-use and GPU powered navigation stack
- kompass-core – Core motion planning and control library
The code in this distribution is Copyright (c) 2025 Automatika Robotics unless explicitly indicated otherwise.
Kompass is made available under the MIT license. Details can be found in the LICENSE file.
We welcome issues, feature requests, and PRs. Feel free to fork and improve!