An efficient task-space capacity calculation package for robotics and biomechanics
Note
pycapacity v3.0 is out: polytope operations, exact conversions between representations and an optional compiled backend - see what’s new
What is pycapacity?
Python package pycapacity provides a set of tools for evaluating task space physical ability metrics for humans and robots, based on polytopes and ellipsoids.
The aim of pycapacity is to provide a set of efficient tools for their evaluation in an easy to use framework that can be easily integrated with standard robotics
and biomechanics libraries. The package implements several state of the art algorithms for polytope evaluation that bring many of the
polytope metrics to the few milliseconds evaluation time, making it possible to use them in online and interactive applications.
The package can be easily interfaced with standard libraries for robotic manipulator rigid body simulation such as robotics-toolbox,
pinocchio or mujoco, as well as human musculoskeletal model biomechanics
softwares opensim and biorbd. The package can also be used with the Robot Operating System (ROS).
The package additionally implements a set of visualization tools for polytopes and ellipsoids based on the
Python package matplotlib intended for fast prototyping and quick and interactive visualization.
pip install pycapacity # or pycapacity[fast] for the compiled backend
New in version 3.0
Polytope operations:
P1 + P2,P1 & P2,A @ P,P + x,a * P,P.contains(x),P.volume(),P.reduce()- see Working with polytopesExact conversions between the vertex and half-space representations, with one inequality per facet and support for flat (lower dimensional) polytopes
Optional compiled backend
pycapacity-cpp: the same functions, 6 to 50 times faster - see C++ accelerationcvxoptis now optional: the linear programs use HiGHS, or GLPK whencvxoptis installed
See the Changelog for the details and for upgrading from v2.
Getting started
User guide