Implementation of the BoundPlanner in combination with BoundMPC.
The main branch deviates slightly from the implementation in the paper. For the paper experiments see the paper branch.
This repository includes a path planner called "BoundPlanner" that plans a path for a receeding horizon trajectory planner called "BoundMPC".
The implementation uses Casadi for the automatic differentiation to provide the required analytical derivatives to the Ipopt solver.
If you only want to run the path planner BoundPlanner, simply installing the requirements using
pip install -r requirements.txt
is enough.
For the robot model, Pinocchio is used. The PyPi version (installed with the above command) of Pinocchio does include the Casadi interface. Thus, as of now, the Casadi functions for the kinematics are part of this repository. If you want to change the robot model, you have to install Pinocchio as explained on the website.
We provide a nix flake for convenience which can creates an environment to run the experiments in. The environment can be activated using
nix develop .
The experiments can be made faster by using the HSL MA57 solver. This solver is not open source and in the interest of providing runnable code to everyone, we provide the implementation without using the HSL MA57 solver.
In order to run the provided example for BoundPlanner without BoundMPC run
python boundplanner_example.py
or for BoundPlanner with BoundMPC run
python boundplanner_with_mpc_example.py
If you want to visualize the results in RViz a ROS2 humble installation is needed.
Build the URDF file for RViz using
cd bound_planner/RobotModel
xacro iiwa14.urdf.xacro mesh_path:=$(pwd) > iiwa_rviz.urdf
Set the variable USE_RVIZ to true at the top of the example file boundplanner_example.py or boundplanner_with_mpc_example.py.
You can start the RViz config with
ros2 launch launch/rviz.launch.py
