Nullspace Model Predictive Controller for a Swerve Drive Robot
Note
Nullspace MPC is a core component of my Ph.D. dissertation, which will be made publicly available on October 1, 2025. Links to the dissertation and related publications will be added here as soon as they are available.
The baseline MPPI controller is based on the following work and is available in a dedicated repository: mppi_swerve_drive_ros
@inproceedings{mizuho2024iros,
author={Aoki, Mizuho and Honda, Kohei and Okuda, Hiroyuki and Suzuki, Tatsuya},
booktitle={2024 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)},
title={Switching Sampling Space of Model Predictive Path-Integral Controller to Balance Efficiency and Safety in 4WIDS Vehicle Navigation},
year={2024},
volume={},
number={},
pages={3196-3203},
doi={10.1109/IROS58592.2024.10802359}}Note: This is the recommended setup for optimal performance.
Click here to expand
-
Prerequisites
-
Clone the repository.
cd <path-to-your-workspace> git clone https://github.com/MizuhoAOKI/nullspace_mpc
-
Install packages not handled by rosdep.
cd <path-to-your-workspace>/nullspace_mpc sudo make install_deps
-
Initialize rosdep, update it, and install ROS dependencies.
cd <path-to-your-workspace>/nullspace_mpc sudo rosdep init # Skip if already initialized rosdep update rosdep install -y --from-paths src --ignore-src --rosdistro noetic
-
Build the project.
cd <path-to-your-workspace>/nullspace_mpc make build
Click here to expand
-
Prerequisites
- Docker
- For Ubuntu users, you can use the convenience script:
curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh
- For Ubuntu users, you can use the convenience script:
- NVIDIA Container Toolkit
- This is required to allow Docker containers to access the host's GPU.
- NVIDIA GPU & Driver
- An NVIDIA GPU and a compatible driver for the base image (nvidia/cuda:12.4.1-devel-ubuntu20.04) are required.
- Docker
-
Clone the repository.
cd <path-to-your-workspace> git clone https://github.com/MizuhoAOKI/nullspace_mpc
-
Build the Docker image (first-time setup).
cd <path-to-your-workspace>/nullspace_mpc make setup_docker_gpu
-
Run the Docker container and start a bash session inside.
cd <path-to-your-workspace>/nullspace_mpc make run_docker_gpu
-
[Inside the docker container] Build the project.
cd ~/nullspace_mpc make build
Click here to expand
Warning: This setup runs entirely on the CPU. Performance is significantly lower, and on my test system it was not sufficient for stable control. Use GPU or native setup whenever possible.
-
Prerequisites
- Docker
- For Ubuntu users:
curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh
- For Ubuntu users:
- Docker
-
Clone the repository.
cd <path-to-your-workspace> git clone https://github.com/MizuhoAOKI/nullspace_mpc
-
Build the Docker image (first-time setup).
cd <path-to-your-workspace>/nullspace_mpc make setup_docker_cpu
-
Run the Docker container and start a bash session inside.
cd <path-to-your-workspace>/nullspace_mpc make run_docker_cpu
-
[Inside the docker container] Build the project.
cd ~/nullspace_mpc make build
This package supports two operation modes:
- Manual Goal Mode — you set a 2D Nav Goal in RViz and the robot navigates to it.
- Demo (Multi-Goal) Mode — the robot automatically visits a sequence of goals defined in an agenda file.
Set a 2D Nav Goal in RViz, and the robot will navigate to the goal.
-
Nullspace MPC (Proposed)
cd <path-to-your-workspace>/nullspace_mpc make navigation_nullspace_mpc
Try this setting for reduced computational load.
cd <path-to-your-workspace>/nullspace_mpc make navigation_nullspace_mpc_lite
-
MPPI (Baseline)
cd <path-to-your-workspace>/nullspace_mpc make navigation_mppi
Runs an evaluation script that automatically sends multiple goals in sequence (defined in data/eval_demo/agenda.yaml) and logs results to ./result/.
-
Nullspace MPC (Proposed)
cd <path-to-your-workspace>/nullspace_mpc make eval_demo_nullspace_mpc
-
MPPI (Baseline)
cd <path-to-your-workspace>/nullspace_mpc make eval_demo_mppi
Note
Due to the asynchronous nature of ROS simulations and the sampling-based algorithm relying on multi-threading computation, the controllers' performance can vary depending on your system environment.
The majority of this project is licensed under the MIT License.
However, the core QP solving capability is provided by QpSolverCollection, which is included in the src/third_party directory and is licensed under the BSD 2-Clause License. See src/third_party/QpSolverCollection/LICENSE for details.
We are deeply grateful to the authors of isri-aist/QpSolverCollection for developing and open-sourcing the useful library.
