Python bindings for Qontrol - A quadratic optimization library for robot control
Project description
Qontrol Python Bindings
Python bindings for Qontrol - A quadratic optimization library for hierarchical robot control.
Qontrol enables efficient inverse kinematics and dynamics with task priorities, joint limits, and custom constraints using quadratic programming.
Features
- Four control levels: Joint Position, Velocity, Acceleration, and Torque control.
- Hierarchical task priorities: Weighted and prioritize multiple tasks (Generalized Hierarchical Control)
- Comprehensive constraints: Joint limits, Cartesian planes, custom constraints
- Multiple solvers: qpOASES, qpmad support (and more coming)
- High performance: Minimal overhead C++ bindings via nanobind
Installation
Install from PyPI:
pip install pyqontrol
Requirements
- Python 3.9+
- NumPy >= 2.0
- Pinocchio >= 2.6 (automatically installed as
pinpackage)
Core Concepts
Control Levels
Qontrol supports three levels of control:
- JointVelocityProblem: Direct velocity control (kinematic)
- JointAccelerationProblem: Acceleration control with dynamics preview
- JointTorqueProblem: Torque-level control with full inverse dynamics
For each control level it is possible to also compute the resulting joint position command.
Tasks
Tasks define control objectives with configurable weights and priorities:
CartesianVelocity/Acceleration: End-effector trackingJointVelocity/Acceleration/Torque: Joint-space control- Custom tasks via generic task interface
Task often represents how a robot should follow a trajectory or a reference pose/configuration.
Constraints
Hard constraints that must be satisfied:
JointConfigurationConstraint: Position limitsJointVelocityConstraint: Velocity limitsJointTorqueConstraint: Torque limitsCartesianPlaneConstraint: Collision avoidance planes
Every constraints can be softened using Slack variables
Resolution Strategies
- Weighted: Combine tasks with weights (QP)
- Generalized: Generalized hierarchical control (GHC). Multiple task with complete hierarchy handling
Examples
The package includes interactive examples demonstrating various control scenarios. After installing with pip install pyqontrol mujoco pin:
# Download example resources (URDF files) from the repository
git clone https://gitlab.inria.fr/auctus-team/components/control/qontrol.git
cd qontrol/bindings/python/examples
# Run interactive velocity control
python velocity_control_interactive.py panda
# Run torque control with dynamics
python torque_control_interactive.py panda
Documentation
Development
Building from Source
If you want to contribute or build from source, the project requires CMake, a C++ compiler, and Eigen3. On Ubuntu/Debian, install the required packages with:
sudo apt install build-essential cmake libeigen3-dev
Qontrol uses the Pinocchio library by default for robot modeling. To install Pinocchio, follow the official installation guide and choose the method that best fits your system: Pinocchio installation guide. Then to build Qontrol from source :
# Clone the repository
git clone https://gitlab.inria.fr/auctus-team/components/control/qontrol
cd qontrol/bindings/python
# Install in editable mode (automatically builds C++ library and Python bindings)
pip install -e .
Running Tests
cd bindings/python
pytest tests/ -v
License
GNU Lesser General Public License v3.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyqontrol-0.1.0-cp310-cp310-manylinux_2_34_x86_64.manylinux_2_35_x86_64.whl.
File metadata
- Download URL: pyqontrol-0.1.0-cp310-cp310-manylinux_2_34_x86_64.manylinux_2_35_x86_64.whl
- Upload date:
- Size: 9.3 MB
- Tags: CPython 3.10, manylinux: glibc 2.34+ x86-64, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37a45b5eb0aa4d17b62b92356a99a2e7173ed4cab41f81e2a879e0cd77fb2ae5
|
|
| MD5 |
34acdd03b422ec82fa0ac928cdcf62a3
|
|
| BLAKE2b-256 |
c07acc6e2c5e2f4b09de87ab19c94e5de744eecab64f47038665ff346d1a075c
|