How rbdl/rbdl-toolkit works
Project type and purpose
• This is a desktop GUI application (“RBDL-Toolkit”) for visualizing rigid body dynamics data.
• Built on top of the RBDL physics library, uses Qt3D for 3D rendering, and is highly extensible via a plugin framework.
• Primary goal: load models (Lua or URDF), run or display dynamics, and allow custom analyses or visual augmentations via plugins.
High-level architectural layers
• Core Application Layer
• Model I/O & Dynamics Layer
• Rendering & UI Layer
• Plugin Framework Layer
• Data & Assets Layer
• External Dependencies Layer
• Build & Deployment Pipeline
a. Core Application
• ToolkitApp (entry point, src/main.cc)
• ToolkitSettings (configuration management)
• PluginManager (discovers/loads plugins/*/*.so or .dll)
• Timeline (animation controller)
• Qt UI dialogs (ModelSelectorDialog, SceneWidget, VectorEditor, etc.)
b. Model Loader & Dynamics
• LuaModelWrapper & URDFModelWrapper (conversion to internal format)
• CSV/Parser modules (csv_input_sanatiser, parser.hpp)
• RBDLWrapper (bridges to RBDL library for dynamics computation)
c. Rendering Engine
• Qt3D backend (SceneWidget, render_util)
• Mesh loader (reads from meshes/)
d. Plugin Framework
• toolkit_interfaces.h (defines extension points)
• metadata.json (plugin descriptors)
• Several plugins under plugins/ (AnimationPlugin, ForceTorquePlugin, RenderPlugin, etc.)
e. Data & Assets
• Mesh files (meshes/)
• Sample inputs (examples/)
f. External Dependencies
• RBDL (found via cmake/FindEigen3.cmake, FindIFW.cmake)
• Qt (Widgets, Qt3D, Core)
• Eigen (math)
• Installer Frameworks (for packaging)
g. Build & Deployment
• CMake scripts (CMakeLists.txt, cmake/)
• CI configs (.github/workflows/cmake_cpp.yml, Jenkinsfile)
• Packaging scripts (extra/): mk_appimage.sh, mk_dmg.sh, snapcraft.yaml, etc.
• User → Core App UI → PluginManager
• PluginManager ↔ Plugins (dynamic discovery & API calls)
• Core App → Model Loader → RBDLWrapper → RBDL Engine
• RBDL Engine → Dynamics results → SceneGraph
• SceneGraph → Qt3D Renderer → Screen
• Plugins can inject new nodes into SceneGraph or pop up UI dialogs
• Data store (meshes/ examples/) → Model Loader & Renderer
• Settings ↔ ToolkitSettings (persistent config)
Architectural patterns & principles
• Plugin Architecture: loose coupling via well-defined C++ interfaces + JSON metadata
• MVC/MVVM elements: separation between data (model loader & RBDL), view (Qt UI + Qt3D), and control (Timeline, Plugin callbacks)
• Modular build: each plugin and core app is a separate CMake target