ELARA, short for Efficient Lie-group Algorithms for Flexible Robotic Analysis and Control, is a MATLAB toolbox for the simulation and optimal control of robotic multibody systems consisting of rigid and highly flexible links. It combines Lie-group kinematics on SE(3), rigid multibody dynamics, geometrically exact beam models, structure-preserving variational integration, and CasADi-based direct optimal control.
- Supports rigid-flexible multibody systems with open-tree kinematics consisting of rigid links, flexible beam links, and one-DoF revolute or finite-pitch screw joints
- Actuation via actuated screw joints or tendon actuation for continuum manipulators
- Analytic kinematics and differential kinematics on SE(3), including forward kinematics, geometric Jacobians, and derivatives of Jacobians
- Time integration using a highly efficient Lie-group variational integrator or any standard ODE solver through a general interface (including all MATLAB ODE solvers)
- CasADi-backed symbolic implementation for direct optimal control
- Direct optimal control with various time discretizations, including variational DMOC, Runge-Kutta (2nd and 4th order), and implicit-midpoint discretizations
- Extensive plotting, visualization, and animation functionality
- Optional MEX implementations of performance-critical simulation functions through MATLAB Coder
- MATLAB
R2025bor later - Signal Processing Toolbox: required by the public SO(3) and SE(3) exponential-map functions used in the core simulation workflow
Optional dependencies:
- CasADi for MATLAB: required for optimal control or other optimization-related tasks (tested with version
3.7.2) - MATLAB Coder and a supported C++ compiler for optional MEX generation
- Symbolic Math Toolbox for tendon-path derivatives
- Robotics System Toolbox, Optimization Toolbox, and Mapping Toolbox for selected optimal-control helpers; see the documentation for feature-level details
There are several convenient ways to install ELARA:
- MATLAB Add-On Explorer (recommended): ELARA can be found by searching for its name and selecting Install. The same installation is available through MATLAB File Exchange.
- Packaged toolbox file: download the toolbox file
elara-toolbox.mltbxfrom the release page, then double-click on it or runmatlab.addons.install("elara-toolbox.mltbx"). - Local repository clone: the folder
elara-toolbox, including its subfolders, can be added to the MATLAB path.
- For optimal control, install CasADi from https://web.casadi.org/ and add it to the MATLAB path
- For MEX generation, install a compatible C++ compiler and set up MATLAB Coder using
mex -setup C++
- In the MATLAB Command Window, run
elara.setupto validate the toolbox installation and its optional components. - With MATLAB Coder and a compatible C++ compiler available,
elara.buildcompiles the performance-critical functions into theelara.mexnamespace. - Run
elara.setupagain to verify that the MEX functions are available. The toolbox will then automatically use functions such aselara.mex.integrateVIBroyden_mexinstead of their MATLAB implementations.
A live quick-start guide explains the installation steps and core functionality.
The examples folder contains several simulation and optimal-control examples for mechanical systems.
The simulation examples demonstrate the standard workflow for simulating the dynamic behavior of mechanical systems:
- Define the system's individual links using an array of
elara.RigidLinkandelara.FlexibleLinkobjects. - Create an
elara.Simulationobject that handles the complete simulation workflow. The simulation object contains anelara.SystemNumobject assembled from the links that represents the complete multibody system. - Configure initial conditions, inputs, gravity, and the final time in the simulation object's
parametersfield. - Select an integrator such as
elara.integration.VIBroydenorelara.integration.ODEDirect. - Run
simulateSystem, and then use the plotting or animation helpers for post-processing.
The optimal-control examples demonstrate:
- Creating an
elara.ocp.Problemobject, which holds the system definition and all parameters of the optimal control problem. - Using the symbolic system object
elara.SystemSymwithin CasADi. - Selecting an OCP discretization such as
elara.ocp.DiscretizationVIorelara.ocp.DiscretizationRK. - Initializing the NLP solver with the
initSolvermethod. - Solving with the
solvemethod and post-processing the resulting trajectory.
Details on the toolbox can be found in its documentation:
- Getting Started
- Defining Multibody Systems
- Running Numerical Simulations
- Solving Optimal-Control Problems
- Visualizing Systems and Results
The documentation is also available in the MATLAB documentation viewer.
To access it, open the documentation (e.g., by typing doc) and select Supplemental Software.
Research making use of the ELARA toolbox may cite the following papers:
BibTeX:
@article{HK24,
title = {Relative-Kinematic Formulation of Geometrically Exact Beam Dynamics Based on {{Lie}} Group Variational Integrators},
author = {Herrmann, Maximilian and Kotyczka, Paul},
year = 2024,
month = dec,
journal = {Computer Methods in Applied Mechanics and Engineering},
volume = {432},
pages = {117367},
issn = {00457825},
doi = {10.1016/j.cma.2024.117367},
}
@inproceedings{HPK26,
title = {Discrete {{Geometric Modeling}} and {{Extended State Estimation}} of {{Continuum Robots}}},
booktitle = {IFAC World Congress},
author = {Herrmann, Maximilian and Pfeiffer, Leander and Kotyczka, Paul},
year = 2026,
address = {Busan},
}APA:
Herrmann, M., & Kotyczka, P. (2024). Relative-kinematic formulation of geometrically exact beam dynamics based on Lie group variational integrators. Computer Methods in Applied Mechanics and Engineering, 432, 117367. https://doi.org/10.1016/j.cma.2024.117367
Herrmann, M., Pfeiffer, L., & Kotyczka, P. (2026). Discrete Geometric Modeling and Extended State Estimation of Continuum Robots. IFAC World Congress.
This project is licensed under the MIT License; see LICENSE for details.
Third-party components in elara-toolbox/third-party/ are redistributed under their respective licenses.
This currently includes:
vert2lcon.mfrom Matt Jacobson's N-dimensional Convex Polyhedra package on MATLAB File Exchange. Included version: 1.9.0.2.
- Maximilian Herrmann (TUM, Chair of Automatic Control)
- Leander Pfeiffer (TUM, Chair of Automatic Control)
The core toolbox was developed by Maximilian Herrmann. Leander Pfeiffer provided feedback and contributions during the final development stages. Philipp Tarbiat, Tobias Farger, and Akash Cheriath also contributed feedback and code snippets during their student projects at the chair. These contributions are marked in the comments.
-
For a release, the toolbox is packaged with the script
tools/packageToolbox.m, which creates the corresponding.mltbxfile. The version number in the script must be incremented manually. -
HTML documentation is generated from the markdown source files under
elara-toolbox/docusing MATLAB DocMaker, which must be installed on the system. Runtools/buildDocs.mto build the HTML files.�
For questions, issues, or feature requests:
- Open an issue on GitHub
- Contact Maximilian Herrmann or Leander Pfeiffer
