Skip to content

AlbericDeLajarte/mpc_motion_planner

Repository files navigation

mpc_motion_planner

A joint space motion planner based on Model Predictive Control (MPC) to find the minimum time trajectory between the current state and target state (position and velocity), while respecting box constraints on joint position, velocity, acceleration and torque, as well as height constraint to avoid the mounting surface of the robot.

We use polyMPC as the MPC library and Ruckig as an initial guess for the solver.

Installation

Requires:

Installation steps

Clone the repository with the submodules, then compile the examples:

git clone --recurse-submodules https://github.com/AlbericDeLajarte/mpc_motion_planner.git 

cd mpc_motion_planner && mkdir build && cd build
cmake ..
make

Testing the examples

Single trajectory

Once compiled, you can launch the examples to test if everything works properly.

build/offline_trajectory

This generates one trajectory between two random states. The trajectory generated by Ruckig (as initial guess) and the MPC are then stored in the file analysis/optimal_solution.txt and can be plotted using the notebook analysis/data_analysis.ipynb

Batch of trajectory

To benchmark the MPC motion planner against Ruckig, you can launch:

build/mpc_benchmark

which will generate a 1000 trajectories and record limit violations and planning statistics in analysis/benchmark_data.txt. You can use the notebook analysis/benchmark_analysis.ipynb to analyse the data.

About

Motion planner based on MPC for robotic arms

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published