This is the project repository for the paper:
https://arxiv.org/abs/2508.21677
.
├── controllers
├── corridor_simulators
├── examples
│ ├── planar_two_dof
│ └── six_dof
└── path_planner- Mosek license (optional)
- Python 3.10
- Install python packages:
pip install -r requirements.txt
- Add project folder to python path
export PYTHONPATH="$(pwd):$PYTHONPATH
The following demonstrates how to run the offline pipeline for a planar 2 DOF manipulator with 10 % uncertainty link masses.
- A Mosek license is required to run the offline pipeline.
- Install cvxpy to support Mosek:
pip install cvxpy[CBC,CVXOPT,GLOP,GLPK,GUROBI,MOSEK,PDLP,SCIP,XPRESS]
- Run offline pipline:
python examples/planar_two_dof/1_run_offline_pipline.py
- List offline results
ls examples/planar_two_dof/data/dof_2_ef_0.1
- Run all methods:
python examples/planar_two_dof/2_run_all.py
- Print results:
python examples/planar_two_dof/3_print_results.py
- Run animation of selected method:
python examples/planar_two_dof/4_visualize_mpcs.py --method {method_name}
where method_name is one of {"nom_star", "rt", "ft"}, where "ft" is our method.
The following demonstrates how run the offline pipeline for a general 6 DOF manipulator with 2 % uncertainty in link masses. It also demonstrates how to run the controller online with our corridor planning approach.
The collisions geometry for the manipulator is made to over-approximates the wrist joints, i.e., the last three DOFs, reducing the configuration-space to 3 DOF. The example includes a pretrained 3 DOF nSCDF which uses spheres as obstacle representation.
- A Mosek license is required to run the offline pipeline.
- Install cvxpy to support Mosek:
pip install cvxpy[CBC,CVXOPT,GLOP,GLPK,GUROBI,MOSEK,PDLP,SCIP,XPRESS]
- Run offline pipline:
python examples/six_dof/1_run_offline_pipline.py
- Install pytorch with CPU version.
pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cpu
- Install additional libraries for animations and collision-detection.
pip install -r requirements_6D.txt
- Run all methods and print results to terminal:
python examples/six_dof/2_run_all.py
The animation shows the following visualizations:
- Obstacles (gray spheres)
- Start configuration (transparent red)
- Goal configuration (transparent green)
- Configuration along closed loop trajectory (gray)
Run animation of our controller:
python examples/six_dof/3_show_world_space_motion.py
The animation is visualized in the 3 dimensional configuration space, which are the first 3 DOF of the manipulator. The animation includes the following:
- Obstacle region (gray mesh)
- Start and goal (red and green spheres)
- Safe corridor (transparent red mesh)
- Centerline of corridor (black curve)
- Optimized MPC path at time step (blue curve)
Run animation of our controller:
python examples/six_dof/4_show_conf_space_motion.py
