This python library contains the code used for the computation of the feasibilty criteria in preprint. In here you can also find the code used to generate the figures and plots of the manuscript.
- 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 with the incorportation of the robot inertial effects as in Abdalla. et al. 2023;
- compute the Reachable region as in Abdalla. et al. 2023;
- 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;
- Numpy
- PyYAML
- Shapely
- Pycddlib
- Scipy
- CVXOPT
- Matplotlib
- Pathos (multiprocessing)
The above dependencies can be installed for Python 3.5 with the following commands:
pip install --user numpy
pip install --user pyyaml
pip install --user shapely
pip install --user pycddlib
pip install --user scipy
pip install --user cvxopt==1.2.5
pip install --user matplotlib
pip install --user pathos==0.2.7
You can remove all --user
arguments to install these Python modules system-wide.
Other dependencies:
after cloning remember to do in the jetleg folder:
git submodules update --init --recursive
- [rospkg]
pip install rospkg
- Ipopt and its Python interface Pypi for the solution of large-scale nonlinear optimization problems
- ffmpeg for the generation of Matplotlib animations
sudo apt-get install ffmpeg
- unittest for testing of dependencies installation and for development
After completing the installation navigate to the examples folder:
- single_iterative_projection_example.py can be used to see how to set up an iterative projection problem in order to compute the friction/actuation/feasible region;
- check_stability_lp_example.py can be used to quickly check whether the given robot configuration is statically stable or not (without explicitly computing the feasible region);
- plotIPstatistics.py can be used to generate some statistics about the computation time of the IP algorithm for random feet positions (see Fig. 6 of the preprint);
- plotInstantaneousActuationRegionVariableMass.py can be used to generate a plot that shows how the feasible regions can changes depending on the gravitational force acting on the robot's center of mass (see Fig. 8 of the preprint)
- 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.
- IMPORTANTE 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