Skip to content

Release v0.3.0 - Advanced Linear Solver & Module Reorganization#4

Merged
thanhndv212 merged 16 commits intomainfrom
release/v0.3.0
Nov 17, 2025
Merged

Release v0.3.0 - Advanced Linear Solver & Module Reorganization#4
thanhndv212 merged 16 commits intomainfrom
release/v0.3.0

Conversation

@thanhndv212
Copy link
Copy Markdown
Owner

🚀 Overview

This release introduces a comprehensive advanced linear solver for robot parameter identification, along with significant module reorganization for improved code maintainability and extensibility.

✨ Major Features

1. Advanced Linear Solver (figaroh.tools.solver)

  • 10 Solving Methods:
    • Basic: lstsq, qr, svd
    • Regularized: ridge, lasso, elastic_net, tikhonov
    • Advanced: constrained, robust, weighted
  • Regularization:
    • L1 (Lasso) for sparse solutions
    • L2 (Ridge) for stability
    • Elastic Net combining L1 & L2
    • Custom Tikhonov with user-defined matrices
  • Constraint Support:
    • Box constraints (bounds on each variable)
    • Linear equality constraints (A_eq @ x = b_eq)
    • Linear inequality constraints (A_ineq @ x <= b_ineq)
  • Quality Metrics:
    • RMSE, R², condition number
    • Residual norms and singular values
  • Optimized for dense, large, thin matrices typical in robot dynamics

2. Module Reorganization

Calibration Module:

  • config.py (624 lines): Configuration parsing & YAML handling
  • parameter.py (240 lines): Parameter management utilities
  • data_loader.py (160 lines): Data loading & I/O operations

Identification Module:

  • config.py (334 lines): Configuration parsing
  • parameter.py (388 lines): Parameter management

Code Reduction:

  • calibration_tools.py: -58% (1,500 → 630 lines)
  • identification_tools.py: -67% (900 → 295 lines)

3. BaseIdentification Enhancement

  • New solve_with_custom_solver() method
  • Flexible solving with regularization and constraints
  • Support for physical parameter bounds (e.g., positive masses/inertias)

🔧 Improvements

Parameter Ordering

Changed to Pinocchio dynamic parameter ordering:

  • New: [Ixx, Ixy, Ixz, Iyy, Iyz, Izz, mx, my, mz, m]
  • Previous: [m, mx, my, mz, Ixx, Ixy, Iyy, Ixz, Iyz, Izz]

Regressor Module

  • Cleaned up build_basic_regressor methods
  • Removed unused tau parameter
  • Improved method signatures and documentation

Code Quality

  • Significant reduction in code duplication
  • Modular design with single responsibilities
  • 100% backward compatibility maintained through re-exports

🧪 Testing

  • 18 comprehensive unit tests in tests/unit/test_solver.py
  • All tests passing in development environment
  • Coverage includes:
    • All 10 solver methods
    • Edge cases and error handling
    • Robot identification scenarios
    • Regularization and constraints

🐛 Bug Fixes

  • Parameter naming: Changed from numbered indices to parent joint names
  • Regressor handling: Better support for additional columns
  • Results manager imports and formatting issues

📝 Files Changed

  • Modified: 6 files
  • New: 7 files
  • Total: 13 files

🔄 Migration Notes

  • Backward Compatible: All existing code continues to work
  • New Features: Optional - can be adopted gradually
  • Parameter Order: Only affects internal computations, APIs unchanged

🔗 Related

  • Resolves branch divergence (devel 38 commits ahead of main)
  • Preserves all version history from both branches
  • Clean integration via professional release branch workflow

✅ Checklist

  • All tests passing (18/18)
  • CHANGELOG.md updated
  • Module reorganization complete
  • Backward compatibility maintained
  • Documentation inline with code
  • No breaking API changes

Integrated all devel branch features including:
- Advanced linear solver with 10 solving methods
- Module reorganization (calibration & identification)
- BaseIdentification enhancement
- Comprehensive test coverage (18 tests)

Resolved CHANGELOG.md conflict by preserving both histories:
- Kept main branch releases (0.2.4, 0.2.3, 0.2.0, 0.1.0)
- Added devel v0.3.0 unreleased section at top
@thanhndv212 thanhndv212 merged commit d8861ce into main Nov 17, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant