Welcome to Horizon’s documentation!¶
Horizon is a framework for trajectory optimization and optimal control tailored to robotic systems. It relies on direct methods to reduce an optimization problem into a NLP that can be solved using many state-of-the-art solvers.
Horizon is based on CasADi, a tool for nonlinear optimization and algorithmic differentiation. It uses Pinocchio to smoothly integrate the robot model into the optimization problem. The structure of Horizon is described here.
Features¶
- complete pipeline from model aquisition to robot deployment
- intuitive API allowing a quick setup of the optimization problem
- ease of configuration and highly customizable: integrators, transcription methods, solvers..
- support state-of-the-art non linear solvers + two custom solvers: ILQR and GNSQP

Install¶
Two distributions are supported:
- pip package:
pip install casadi_horizon
- conda package:
conda install horizon -c francesco_ruscelli
Getting started¶
Some examples demonstrating trajectory optimization for different robots are available. Besides installing Horizon on your machine and running the examples, you can try out the framework in independent evinronments:
- on your browser, through JupyterLab: horizon-web
- on your machine, through Docker: horizon-docker
Videos¶
A collection of clips demonstrating the capabilities of Horizon is gathered in the video below, where are gathered trajectory optimization demos with several robots: Centauro, Spot ®, Kangaroo, TALOS, a 7-DoF industrial manipulator and a prototype 2-DoF leg.
The full playlist of videos is found here.
Contents:
- Horizon package
- Subpackages
- horizon.ros package
- horizon.solvers package
- horizon.transcriptions package
- horizon.utils package
- Submodules
- horizon.utils.collision module
- horizon.utils.kin_dyn module
- horizon.utils.mat_storer module
- horizon.utils.plotter module
- horizon.utils.refiner module
- horizon.utils.replayer module
- horizon.utils.replayer_fd module
- horizon.utils.replayer_fd_mx module
- horizon.utils.replayer_mx module
- horizon.utils.resampler_trajectory module
- horizon.utils.rti module
- horizon.utils.send_to_gazebo module
- horizon.utils.utils module
- horizon.utils.vis_refiner_global module
- Module contents
- Submodules
- horizon.functions module
- horizon.misc_function module
- horizon.problem module
- horizon.type_doc module
- horizon.variables module
- Module contents
- Subpackages
- Horizon scheme
- Horizon docker