Skip to main content

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 pin package)

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 tracking
  • JointVelocity/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 limits
  • JointVelocityConstraint: Velocity limits
  • JointTorqueConstraint: Torque limits
  • CartesianPlaneConstraint: 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

Metadata

Release files for pyqontrol 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyqontrol 0.3.0
File Size Uploaded Provenance Actions
pyqontrol-0.3.0.tar.gz 87.9 kB Without provenance Details for pyqontrol-0.3.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pyqontrol 0.3.0
File Interpreter ABI Platform Actions
pyqontrol-0.3.0-cp312-cp312-manylinux_2_39_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.39+ x86-64 Details for pyqontrol-0.3.0-cp312-cp312-manylinux_2_39_x86_64.whl
pyqontrol-0.3.0-cp310-cp310-manylinux_2_34_x86_64.manylinux_2_35_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.35+ x86-64, Linux glibc 2.34+ x86-64 Details for pyqontrol-0.3.0-cp310-cp310-manylinux_2_34_x86_64.manylinux_2_35_x86_64.whl

Total release size: 20.3 MB

Release files / pyqontrol-0.3.0.tar.gz

Download URL pyqontrol-0.3.0.tar.gz
Size 87.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1dbb95c9edc082f81c284b42267b9a1f56ea46c4ed3b406165354a6247be7da6
BLAKE2b-256 checksum
How to use checksums
a8e9f0faed0208d44d733625e93064f487e8b5647a49b85e8bb0220b59ad505a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Release files / pyqontrol-0.3.0-cp312-cp312-manylinux_2_39_x86_64.whl

Download URL pyqontrol-0.3.0-cp312-cp312-manylinux_2_39_x86_64.whl
Size 10.3 MB
Tags CPython 3.12 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
a6814a2fc2aae1bbc572f898eb4b6fc019856788f9f87aa85412eb9cfd27fa97
BLAKE2b-256 checksum
How to use checksums
a1e0208107b98137d0f4dd83f96b3bd791439a9e03891fc803b3e5ec8f4aeab3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Release files / pyqontrol-0.3.0-cp310-cp310-manylinux_2_34_x86_64.manylinux_2_35_x86_64.whl

Download URL pyqontrol-0.3.0-cp310-cp310-manylinux_2_34_x86_64.manylinux_2_35_x86_64.whl
Size 10.0 MB
Tags CPython 3.10 Linux glibc 2.34+ x86-64 Linux glibc 2.35+ x86-64
SHA-256 checksum
How to use checksums
c63bb2b4b94f5c7b61c4e270f2eadfd1ff6fc05c058480872767eb0bfbf75b2f
BLAKE2b-256 checksum
How to use checksums
22b7cca93dfbeb17c644869aac8152e42badc84daebed6f4f090ded56c3eaefa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Security for pyqontrol 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.0 This release

3 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page