This python library contains the code used for the motion planning formulation proposed in this preprint. In here you can also find the code used to generate the figures and plots of the manuscript.
Jet-leg performs common operations over convex polyhedra in higher dimensions in order to assess the problem of stability and motion feasibility of legged robots.
- compute the Support region of legged robots as in Bretl. et al. 2008;
- compute the Feasible region of legged robots as in Orsolino. et al. 2019;
- compute force polytopes of legged robots given their URDF;
- compare different leg designs and understand their consequences on the robot's balancing capabilities;
- test various formulations of linear, convex or nonlinear trajectory optimization problems;
You can directly install the pre-built library usign pip. First, create a virtual environment:
python -m venv my_project
cd source/bin/activate
Then, install the required dependencies:
sudo apt-get install -y cython libglpk-dev python3-tk
pip install pytest numpy scipy matplotlib pycddlib pypoman pin
and finally run:
pip install jet-leg
To make sure that the installation worked as expected, you can make sure that the following command runs without errors:
python3 -c "import jet_leg"
Have a look to the this folder for a few examples on how to use the library.
For active development of the library a source installation is recommended. For this, you will need to clone the repo first. Then, you can build the package using the provided Docker environment. Do so by running the following command:
cd jet-leg
./build.sh
This will create a docker image with all the required dependencies. You can then attach the image by running:
./run.sh
To make sure that the installation worked successfully, you can run, for example:
python3 examples/iterative_projection/single_iterative_projection_example.py
The example above should generate two figures representing the feasible region of the Anymal robot in a default configuration in 2D and 3D.
- Ipopt and its Python interface Pypi for the solution of large-scale nonlinear optimization problems
- ffmpeg for the generation of Matplotlib animations
- unittest for testing of dependencies installation and for development
- Jet-leg has been tested using Python 3.8.17 and Docker;
- If CVXOPT is not found even after trying the pip-installation, we then suggest to try install the version 1.1.4 of CVXOPT using Synaptic or to clone and install it manually after building. Note: delete every previous installation of cvxopt that is in the system using locate cvxopt (after sudo updatedb)
- The pypoman and pymanoid libraries developed by Stéphane Caron
- Komei Fukuda's Frequently Asked Questions in Polyhedral Computation
- The Polyhedron class in Sage
- The StabiliPy package provides a more general recursive projection method
- Pinocchio is used to compute the Jacobian matrix and to solve the Inverse Kinematics (IK) problem.