How robotology/idyntree works
Main components
a. Core Library (src/core): This is the foundation where the low-level algorithms (e.g., kinematics, dynamics, common numerical utilities, and data structures such as the undirected graph Model) are implemented.
b. Modules and Extensions:
– Estimation (src/estimation): Implements algorithms for sensor fusion, torque estimation, and filters (e.g., Extended Kalman Filter, Mahony filter).
– Model Representation (src/model & src/model_io): Handles robot models, URDF file parsing/writing, and tools for model calibration.
– Inverse Kinematics (src/inverse-kinematics): Contains solvers and related modules.
– High-Level Computations (src/high-level): Provides higher-level abstractions (e.g., KinDynComputations) that build on core functionalities.
– Optimal Control (src/optimalcontrol): Implements controllers, cost functions, dynamics integration, and optimal control solvers.
– Visualization (src/visualization): Includes components for visualizing robot models (using tools like Meshcat) and other graphical tools.
– YARP Integration (src/yarp): Contains interfaces/adapters for YARP configurations.
c. Bindings and Language Interfaces:
– MATLAB Bindings (bindings/matlab): Wraps C++ functions into MATLAB (including autogenerated bindings and high-level wrappers).
– Python Bindings (bindings/python and bindings/pybind11): Uses pybind11 to create Python-accessible interfaces along with examples and tests.
e. Examples and Tests:
– Examples (examples): Demonstrates usage in C++, MATLAB, and Python.
– Tests (src/tests, various module-specific tests): Ensure correctness and serve as integration/demonstration points.
f. Documentation and Developer Support:
– Docs (doc and docs) and Developer Documentation (doc/dev): Provide guidelines, Doxygen files, and build instructions.
g. External Dependencies/Integration:
– “extern” folder: Third-party or related libraries (e.g., MOxUnit for MATLAB, mesh2tri, and fpconv).
– CI/CD workflow files, CMake build scripts, and configuration files for continuous integration.
Relationships and interactions
– Show that higher-level modules (estimation, inverse kinematics, optimal control, model, and visualization) rely on the core components.
– Indicate that language-specific bindings wrap around the C++ library modules, exposing key functions to MATLAB and Python users.
– Represent command-line utilities as external client applications that call into the core and helper modules.
Architectural patterns and design principles
– Modularity: Each module (core, estimation, model, inverse kinematics, optimal control, etc.) is separated into its own directory and built as an independent library component.
– Layering: Core functionalities form the foundation, with layers of abstraction built on top.
– Multi-language binding: There is a clear separation between the native C++ implementation and the binding layers (Python, MATLAB) that re-use the same logic.
– Build System Integration: Extensive CMake configuration indicates a design built around a robust, multi-target compilation with cross-platform support.
– Testing and Continuous Integration: The presence of multiple test folders and CI workflows indicates that the system emphasizes correctness and maintainability.
Relevant technologies, frameworks, and libraries
– Programming languages: C++ for core computations; Python and MATLAB for bindings.
– Build system: CMake (with scripts under cmake/), and configuration files like setup.py and pyproject.toml.
– Documentation generation: Doxygen (see Doxyfile) and Sphinx (docs/).
– External libraries: YARP (for integration), Eigen (for numerical computing, as seen in examples), and possibly MOxUnit for MATLAB testing.
– Clear labels for each major component (e.g., Core, Estimation Module, Inverse Kinematics, Model I/O, Optimal Control, Visualization, MATLAB Bindings, Python Bindings, Tools, Examples, External Integrations).