This is the accompaning code of the paper titled "A novel MPC framework for efficient navigation of mobile robots in cluttered environments". Read preprint on arXiv
🎥 Click to watch the experiment video
This software is based on the Control and Robotics Software (CRS), an advanced control software framework to support simulations and experiments in the fields of control and robotics. CRS is built on top of the Robot Operating System (ROS) and primarily written in C++ and Python. The CRS environment uses Docker to allow cross-platform compatibility. The only requirement you have is to run an up-to-date operating system and up to 16 GB of free storage (some of it is only required during the setup). Below you find the install instructions for Ubuntu, macOS and Windows.
First, install the crs-docker tool based on your operating system:
Ubuntu (recommended)
These instructions were tested on the following Ubuntu versions:
- 20.04 LTS
- 22.04 LTS
- 24.04 LTS
However, the instructions should apply to all recent Ubuntu versions.
-
Install Docker using the offical install instructions  Note: The install instructions list Ubuntu in the server section!
-
Allow Docker execution as a non-root user; follow these instructions  Note: Only do the first section "Manage Docker as a non-root user"
-
Test your Docker installation with the following command  Note: You might want to restart your computer at this point.
docker run hello-world
-
Clone the git repository
git clone https://github.com/IntelligentControlSystems/ClutteredEnvironment.git
-
Navigate to the Ubuntu setup folder
cd ClutteredEnvironment/.setup/ubuntu -
Execute the setup script
./setup.sh
Arch Linux
The Installation does not differ too much from the Ubuntu installation. There is however one caveat on Arch Linux: Running Docker containers might fill up your memory and crash your system. To prevent this, add following lines to the file /etc/docker/daemon.json :
{
"default-ulimits": {
"nofile": {
"Name": "nofile",
"Soft": 1024,
"Hard": 524288
}
}
}Do not forget to restart the docker service with sudo systemctl restart docker.
Alternatively, one can specify these limits in the docker-compose.yaml file:
version: '3'
name: "crs"
services:
crs:
...
# ADD THESE 4 LINES
ulimits:
nofile:
soft: 1024
hard: 524288
...MacOS
These instructions were tested on macOS Sonoma (14.4). However, the instructions should apply to all recent macOS versions.
-
Install Docker using the offical install instructions
-
Test your Docker installation with the following command
docker run hello-world
-
Clone the git repository  Note: Make sure you have a SSH key set up, otherwise this doesn't work.
git clone https://github.com/IntelligentControlSystems/ClutteredEnvironment.git
-
Navigate to the MacOS setup folder
cd ClutteredEnvironment/.setup/macos -
Execute the setup script
./setup.sh
Windows
These instructions were tested on the following Windows versions:
- Windows 11
Windows 10 should work as well, but might need some slight modifications.
-
Install Docker using the official install instructions
-
Make sure to run Docker on WSL 2 (see Docker Desktop WSL 2 backend on Windows)
-
Open a PowerShell Terminal and get into your default WSL with:
wsl
-
Test your Docker installation with the following command  Note: You might want to restart your computer at this point.
docker run hello-world
-
Clone the git repository Note: Make sure you have a SSH key set up, otherwise this doesn't work.
git clone https://github.com/IntelligentControlSystems/ClutteredEnvironment.git
-
Navigate to the Ubuntu setup folder
cd ClutteredEnvironment/.setup/ubuntu -
Execute the setup script
./setup.sh
After installation, navigate to the root of this repository, and check the help manual page:
crs-docker --help
usage: crs-docker <command> [-h]
there are the following commands:
up [-b/-p]: Starts docker container with CRS environment.
-b | --build: build CRS Docker image from scratch.
-p | --pull: pull CRS Docker image from registry.
down: Shuts down docker container.
run: Open interactive shell in container.
clean: Delete the previously built Docker image. 'crs-docker up -b' will rebuild the image.
attach: Attach to a running container (only works for a single running container).This is only needed once during setup.
After the crs-docker tool-chain setup:
-
Navigate to repository root.
-
Build the Docker image locally:
[ClutteredEnvironment]$ crs-docker up -b
Expected outcome in console for crs-docker up -b
#40 resolving provenance for metadata file
#40 DONE 0.0s
[+] Running 2/2
✔ ghcr.io/intelligentcontrolsystems/crs-2.0:cluttered-environment Built 0.0s
✔ Container crs StartedThe source code in this repository will be built in a Docker container created from the Docker image built in the previous section.
-
Launch the Docker container from the root of this repository. (This also mounts all current repository's contents in the
/codedirectory INSIDE the container)[ClutteredEnvironment]$ crs-docker run -
Build all packages (inside the container)
-
This is needed ONLY the first time
/code# crs init -
This is needed initially, AND when source files changed
/code# crs build
-
Expected outcome in console for crs build
[build] Summary: All 26 packages succeeded!
[build] Ignored: None.
[build] Warnings: 5 packages succeeded with warnings.
[build] Abandoned: None.
[build] Failed: None.
[build] Runtime: 1 minute and 50.6 seconds total.
[build] Note: Workspace packages have changed, please re-source setup files to use them.
After building the source code, run the simulation experiment
/code# source devel/setup.bash
/code# roslaunch crs_launch sim_single_car.launchAnd the same Demo as above will show up. One can drag the target destination around, before the car reaches it, to see the real-time re-planning to navigate around obstacles.
In the folder src/ros4crs/crs_launch/config/experiments/cluttered, edit the following config files. The most important are
simulator.yaml: starting point of the simulationplanner.yaml: planner config, and location of the initial targetobstacles.yaml: The position of the obstacles or if they should be randomly generatedsolver.yaml: specifies thenum_obstacles,num_segments, and model bounds
Changes in solver.yaml not reflected in simulation
-
The
solver.yamlis symlinked from the solver config insrc/crs/controls/car/mpc_solvers/acados/acados_kinematic_nonconvex_mpc_solver/config/solver_nonconvex_mpc.yaml. -
This is also a compile-time config since it affects code genration. If you change, make sure to REBUILD the source files
-
If you see errors when you rebuild, you may have to (inside the
crscontainer) run/code# catkin build --force-cmake acados_kinematic_nonconvex_mpc_solverand then rebuild
Problem building Docker image with crs-docker up -b
Docker fails to resolve the base image, and an error like the following shows up in the console:
#3 ERROR: failed to do request: Head "https://registry-1.docker.io/v2/library/ros/manifests/noetic-ros-core-focal": dial tcp: lookup registry-1.docker.io on 192.168.1.1:53: read udp 172.17.0.
2:60410->192.168.1.1:53: i/o timeout
------
> [internal] load metadata for docker.io/library/ros:noetic-ros-core-focal:
------
Dockerfile:1
--------------------
1 | >>> FROM ros:noetic-ros-core-focal
2 |
3 | # Install, on top of core, the desktop packages of ROS
--------------------
failed to solve: ros:noetic-ros-core-focal: failed to resolve source metadata for docker.io/library/ros:noetic-ros-core-focal: failed to do request: Head "https://registry-1.docker.io/v2/libr
ary/ros/manifests/noetic-ros-core-focal": dial tcp: lookup registry-1.docker.io on 192.168.1.1:53: read udp 172.17.0.2:60410->192.168.1.1:53: i/o timeout
This might be due to Docker's DNS options. It might happen if the user is using coporate/institute network. An example solution is given with the case of Ubuntu system.
The user can add/set DNS options for docker by creating or editing the /etc/docker/daemon.json file with contents:
{
"dns": ["8.8.8.8", "8.8.4.4"]
}
And restarting the Docker daemon by:
sudo systemctl restart docker
And retry the crs-docker up -b command. It should get past the base image resolution.
How long does the build take?
Here are some references:
-
Machine specs
OS: Ubuntu 24.04.3 LTS CPU: 12th Gen Intel® Core™ i7-1260P × 16 MEM: 32.0 GiB -
Building time for the Docker image (
crs-docker up -b): ~17 minutes -
Building time for the source code (
crs build): ~2 minutes
If you use this method, please cite our corresponding article:
@article{kohler2025cluttered,
title={An MPC framework for efficient navigation of mobile robots in cluttered environments},
author={K{\"o}hler, Johannes, Zhang, Daniel and Soloperto, Raffaele and Carron Andrea and Zeilinger, Melanie N},
journal={arXiv preprint arXiv:2509.15917},
year={2025}
}



