Repo including a simple mpc planner for a mobile base. The implementation is completely independent of the Robot Operating System (ROS) but can be combined with ROS1 and ROS2 via harmony_mpcs_ros.
The implementation currently uses Embotech's ForcesPro solver. The license is free for educational use.
You have to request a license for forcespro and install it according to their documentation. Helpful information about assigning the license to your computer can be found here.
To make use of the ForcesPro solver with python follow their instructions here.
The location of the python package forcespro
must also be included in your python path.
export PYTHONPATH="${PYTHONPATH}:/path/to/forces/pro"
Consider adding it to your .bashrc
(.zshrc
) file
We use poetry to install python dependencies in a virtual environment. Install poetry by following the instructions provided in the poetry-docs.
Then run
python install
and
Source the generated environment using
python shell
and install the harmony_mpcs package via
pip install -e .
Genterate the solver:
cd harmony_mpcs/harmony_mpcs/examples
python generate_solver.py
Run the example
python dingo_example.py
The parameters of the mpc can be adapted in the config file in examples/config.