Skip to main content

A Python toolbox for dynamics identification and geometric calibration of robots and humans

Project description

FIGAROH

Free dynamics Identification and Geometrical cAlibration of RObot and Human

FIGAROH is a Python toolbox providing efficient and highly flexible frameworks for dynamics identification and geometric calibration of rigid multi-body systems based on the URDF modeling convention. It supports both serial (industrial manipulators) and tree-structure systems (humanoids, mobile manipulators).

๐Ÿ“ฆ Available on PyPI: pip install figaroh
๐Ÿ“– Version: 0.3.0

Note: This repo is a fork from gitlab repo of which the author is no longer a contributor.


Installation

Quick Installation (Recommended)

Install the core FIGAROH package with all dependencies (except for cyipopt):

pip install figaroh

Development Installation

For development or local installation from source, choose one of these methods:

Method 1: Direct pip installation (Simple)

git clone https://github.com/thanhndv212/figaroh-plus.git
cd figaroh
pip install -e .

Method 2: Conda environment (Recommended for the use of cyipopt)

git clone https://github.com/thanhndv212/figaroh-plus.git
cd figaroh
# Create conda environment with optimization libraries
conda env create -f environment.yml
conda activate figaroh-dev

Examples Repository

git clone https://github.com/thanhndv212/figaroh-examples.git
cd figaroh-examples && pip install -r requirements.txt

Package Structure

figaroh/
โ”œโ”€โ”€ calibration/          # Geometric calibration framework
โ”‚   โ”œโ”€โ”€ BaseCalibration       # Abstract base class for kinematic calibration
โ”‚   โ”œโ”€โ”€ calibration_tools     # Parameter parsing, regressor computation
โ”‚   โ”œโ”€โ”€ config                # Configuration loading and validation
โ”‚   โ”œโ”€โ”€ data_loader           # CSV data loading utilities
โ”‚   โ””โ”€โ”€ parameter             # Kinematic parameter management
โ”‚
โ”œโ”€โ”€ identification/       # Dynamic parameter identification
โ”‚   โ”œโ”€โ”€ BaseIdentification    # Abstract base class for dynamic identification
โ”‚   โ”œโ”€โ”€ identification_tools  # Regressor utilities, parameter extraction
โ”‚   โ”œโ”€โ”€ config                # Identification configuration parsing
โ”‚   โ””โ”€โ”€ parameter             # Inertial parameter management (friction, inertia)
โ”‚
โ”œโ”€โ”€ optimal/              # Optimization-based trajectory & configuration
โ”‚   โ”œโ”€โ”€ BaseOptimalTrajectory     # IPOPT-based trajectory optimization
โ”‚   โ”œโ”€โ”€ BaseOptimalCalibration    # Optimal calibration posture selection
โ”‚   โ”œโ”€โ”€ BaseParameterComputer     # Base parameter computation utilities
โ”‚   โ”œโ”€โ”€ TrajectoryConstraintManager # Constraint handling for optimization
โ”‚   โ””โ”€โ”€ config                    # Optimization configuration management
โ”‚
โ”œโ”€โ”€ tools/                # Core robotics utilities
โ”‚   โ”œโ”€โ”€ RegressorBuilder      # Object-oriented regressor computation
โ”‚   โ”œโ”€โ”€ LinearSolver          # Advanced linear solver (LS, Ridge, Lasso, etc.)
โ”‚   โ”œโ”€โ”€ QRDecomposer          # QR decomposition for base parameters
โ”‚   โ”œโ”€โ”€ CollisionManager      # Collision detection and visualization
โ”‚   โ”œโ”€โ”€ RobotIPOPTSolver      # IPOPT optimization wrapper
โ”‚   โ””โ”€โ”€ CubicSpline           # Trajectory interpolation utilities
โ”‚
โ”œโ”€โ”€ utils/                # Helper utilities
โ”‚   โ”œโ”€โ”€ UnifiedConfigParser   # YAML config with inheritance support
โ”‚   โ”œโ”€โ”€ ResultsManager        # Unified plotting and result export
โ”‚   โ”œโ”€โ”€ error_handling        # Custom exceptions and validation
โ”‚   โ””โ”€โ”€ cubic_spline          # Spline trajectory generation
โ”‚
โ”œโ”€โ”€ measurements/         # Data acquisition and processing
โ””โ”€โ”€ visualisation/        # Meshcat-based 3D visualization

Core Modules

figaroh.calibration โ€” Geometric Calibration

BaseCalibration provides a complete framework for kinematic parameter calibration:

  • Automatic parameter identification using QR decomposition
  • Robust optimization with iterative outlier removal (Levenberg-Marquardt)
  • Unit-aware weighting for position/orientation measurements
  • Multiple calibration models: full kinematic parameters, joint offsets
  • Sensor support: cameras, motion capture, planar constraints

figaroh.identification โ€” Dynamic Identification

BaseIdentification implements the complete dynamic parameter identification workflow:

  • Standard + extended parameters: inertial parameters, friction (viscous/Coulomb), actuator inertia, joint offsets
  • Regressor-based identification with base parameter reduction
  • Multiple solvers: Least Squares, Weighted LS, Ridge, Lasso, Elastic Net
  • Decimation and filtering for signal processing
  • Quality metrics: RMSE, correlation, condition number

Physical Consistency (optional, default-off)

FIGAROH can optionally project per-joint inertial parameters onto a physically consistent set using a convex SDP/LMI based on Pinocchio pseudo-inertia.

  • Enable it in config via identification.physical_consistency.enabled: true.
  • Requires optional dependencies: picos and an SDP solver backend (e.g. cvxopt).

figaroh.optimal โ€” Trajectory & Configuration Optimization

BaseOptimalTrajectory generates exciting trajectories for dynamic identification:

  • IPOPT-based nonlinear optimization with cyipopt
  • Cubic spline parameterization for Cยฒ continuous trajectories
  • Constraint handling: joint limits, velocity limits, torque limits, self-collision
  • Cost functions: condition number minimization, excitation maximization

BaseOptimalCalibration selects optimal calibration configurations:

  • Combinatorial optimization from feasible posture pool
  • Observability-based selection for maximum information gain

figaroh.tools โ€” Robotics Utilities

Class Description
RegressorBuilder Object-oriented regressor computation with configurable parameters
LinearSolver Advanced solver supporting 10+ methods (lstsq, QR, SVD, Ridge, Lasso, etc.)
QRDecomposer QR decomposition with column pivoting for base parameter identification
CollisionManager Pinocchio-based collision detection with visualization
RobotIPOPTSolver High-level IPOPT interface with automatic differentiation

figaroh.utils โ€” Configuration & Results

Class Description
UnifiedConfigParser YAML parsing with template inheritance and variable expansion
ResultsManager Unified plotting for calibration/identification results
CubicSpline Cยฒ continuous spline trajectory generation

Key Features

๐Ÿ”ง Dynamic Identification

  • Extended dynamic models: friction, actuator inertia, joint offsets
  • Optimal exciting trajectory generation (IPOPT)
  • Multiple parameter estimation algorithms
  • Physically consistent parameters for URDF updates

๐Ÿ“ Geometric Calibration

  • Full kinematic parameter estimation (6 DOF per joint)
  • Optimal posture selection via combinatorial optimization
  • Support for cameras, motion capture, planar constraints
  • Direct URDF model updates

โš™๏ธ Configuration System

  • Unified YAML format with template inheritance
  • Automatic format detection (legacy compatibility)
  • Variable expansion and validation
  • Task-specific configs: calibration, identification, optimal trajectory

๐Ÿ› ๏ธ Modern Architecture

  • Proper logging (NullHandler pattern for libraries)
  • Abstract base classes for extensibility
  • Pinocchio 3.x compatibility
  • Cross-platform: Linux, macOS, Windows

Methodology

FIGAROH implements a systematic workflow for robot calibration and identification:

Step 1: Configuration Setup

Define robot parameters, sensor configurations, and task-specific settings in YAML:

# config/robot_config.yaml
robot:
  name: "my_robot"
  urdf_path: "models/robot.urdf"

calibration:
  start_frame: "base_link"
  end_frame: "tool0"
  method: "full_params"
  
identification:
  has_friction: true
  has_actuator_inertia: true
  active_joints: ["joint1", "joint2", "joint3"]

  physical_consistency:
    enabled: false
    solver: "cvxopt"
    mass_min: 1e-6
    psd_eig_tol: -1e-10
    skip_if_feasible: true

Step 2: Optimal Experiment Design

Generate exciting trajectories or calibration postures:

  • For identification: Solve IPOPT optimization to find trajectories maximizing regressor condition
  • For calibration: Combinatorial selection of postures maximizing observability

Step 3: Data Collection & Processing

Load experimental data with automatic validation:

from figaroh.calibration import BaseCalibration

calibrator = MyCalibration(robot, "config/robot_config.yaml")
calibrator.load_data("data/measurements.csv")

Step 4: Parameter Estimation

Run identification/calibration with quality metrics:

# Calibration
calibrator.solve()
print(f"RMSE: {calibrator.evaluation_metrics['rmse']:.6f}")

# Identification  
identifier.solve(decimate=True, decimation_factor=10)
print(f"Correlation: {identifier.correlation:.4f}")

Step 5: Model Update

Export calibrated/identified parameters to URDF or YAML.


Dependencies

Category Packages
Scientific numpy, scipy, matplotlib, pandas, numdifftools
Robotics pinocchio (pin), ndcurves, meshcat
Config pyyaml, rospkg
Optimization cyipopt (conda), picos

Examples

Complete working examples are available in figaroh-examples:

Robot Tasks
Staubli TX40 Dynamic identification
Universal UR10 Geometric calibration (RealSense camera)
TIAGo Full workflow: identification + calibration
TALOS Humanoid Torso-arm calibration, whole-body calibration

Citations

If you use FIGAROH in your research, please cite the following papers:

Main Reference

@inproceedings{nguyen2023figaroh,
  title={FIGAROH: a Python toolbox for dynamic identification and geometric calibration of robots and humans},
  author={Nguyen, Dinh Vinh Thanh and Bonnet, Vincent and Maxime, Sabbah and Gautier, Maxime and Fernbach, Pierre and others},
  booktitle={IEEE-RAS International Conference on Humanoid Robots},
  pages={1--8},
  year={2023},
  address={Austin, TX, United States},
  doi={10.1109/Humanoids57100.2023.10375232},
  url={https://hal.science/hal-04234676v2}
}

Related Work

@inproceedings{nguyen2024improving,
  title={Improving Operational Accuracy of a Mobile Manipulator by Modeling Geometric and Non-Geometric Parameters},
  author={Nguyen, Thanh D. V. and Bonnet, V. and Fernbach, P. and Flayols, T. and Lamiraux, F.},
  booktitle={2024 IEEE-RAS 23rd International Conference on Humanoid Robots (Humanoids)},
  pages={965--972},
  year={2024},
  address={Nancy, France},
  doi={10.1109/Humanoids58906.2024.10769790}
}

@techreport{nguyen2025humanoid,
  title={Humanoid Robot Whole-body Geometric Calibration with Embedded Sensors and a Single Plane},
  author={Nguyen, Thanh D V and Bonnet, Vincent and Fernbach, Pierre and Daney, David and Lamiraux, Florent},
  year={2025},
  institution={HAL},
  url={https://hal.science/hal-05169055}
}

License

Please refer to the LICENSE file for licensing information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

figaroh-0.3.1.tar.gz (377.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

figaroh-0.3.1-py3-none-any.whl (165.9 kB view details)

Uploaded Python 3

File details

Details for the file figaroh-0.3.1.tar.gz.

File metadata

  • Download URL: figaroh-0.3.1.tar.gz
  • Upload date:
  • Size: 377.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for figaroh-0.3.1.tar.gz
Algorithm Hash digest
SHA256 7c3d4811f480b29843f866b0e9569da6c86bbe2a5927f53115b74c41672c0a03
MD5 d5c19e0182ca8d7d901eedf126b1172c
BLAKE2b-256 aa03219465feede2d25c38f62f24208254e61f450b4e072c5a11fb7be6b1ed03

See more details on using hashes here.

File details

Details for the file figaroh-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: figaroh-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 165.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for figaroh-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 03e9d133b849329e3716a81156da575fd5c643d9f2196d6bc1f08c35494bb989
MD5 25adb9f7cef32e8e449d9d39a6742f62
BLAKE2b-256 fa60002af4a4c58b20b76ac3807bea36e751879e7c3953939ea712bbf7475c67

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page