Mystica
mystica is a Matlab library for simulating multi-body robots relying on a maximal coordinate approach
Install / Use
/learn @ami-iit/MysticaREADME
Multi bodY SimulaTor maxImal CoordinAtes
mystica is a MATLAB library to simulate the kinematics and dynamics of multibody systems. mystica computes the system evolution by modeling the problem using a state definition that we define maximal. The maximal representation consists of a set of non-minimum variables 𝐪 complemented by the holonomic constraint g(𝐪) = 0.
<p align="center"> <b>:warning: REPOSITORY UNDER DEVELOPMENT :warning:</b> <br>The libraries implemented in this repository are still experimental, and we cannot guarantee a stable API. </p>
Table of Contents
- :hammer: Dependencies
- :floppy_disk: Installation
- :rocket: Usage
- :gear: Contributing
- Citing this work
- Maintainer
:hammer: Dependencies
MATLABMATLAB Curve Fitting Toolboxfor thesmoothfunction- A MATLAB supported compiler for MEX-file compilation
Other requisites are:
Both CasADi and yamlmatlab are downloaded and configured in the Installation section.
:floppy_disk: Installation
- Clone the repo:
git clone https://github.com/ami-iit/mystica.git
cd mystica
- Run the
install()function in MATLAB.
install()
The install() function downloads mambaforge. mambaforge is a package manager that downloads and configures our dependencies in a conda environment called mystica.
⚠️ Known issue
For some versions of Ubuntu and MATLAB, MATLAB is not able to load the required libraries like CasADi (see issue). A possible workaround is to launch matlab with LD_PRELOAD:
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6 matlab
:rocket: Usage
Before every usage, remember to run the autogenerated MATLAB file called deps/setup.m to set up the MATLABPATH.
Alternatively, you can launch MATLAB from the terminal after activating the conda environment called mystica:
conda activate mystica
matlab
Here's a snippet of code to simulate the kinematics of a 4-bar linkage mechanism:
model = mystica.model.getModel4BarLinkage();
stgs = mystica.stgs.getDefaultSettingsSimKinRel(model);
data = mystica.runSimKinRel('model', model, 'stgs', stgs, 'mBodyPosQuat_0', model.getMBodyPosQuatRestConfiguration, 'nameControllerClass', 'mystica.controller.ExampleKinRel');
mystica.viz.visualizeKinRel('model', model, 'data', data, 'stgs', stgs)
Other examples can be found in the examples directory.
If you want to delve deeper into the code, we have prepared this document as an entry point to explain and describe our variables.
:gear: Contributing
mystica is an open-source project, and is thus built with your contributions. We strongly encourage you to open an issue with your feature request. Once the issue has been opened, you can also proceed with a pull-request. :rocket:
Citing this work
If you find the work useful, please consider citing:
@ARTICLE{9793615,
author={Bergonti, Fabio and Nava, Gabriele and Fiorio, Luca and L’Erario, Giuseppe and Pucci, Daniele},
journal={IEEE Transactions on Robotics},
title={Modeling and Control of Morphing Covers for the Adaptive Morphology of Humanoid Robots},
year={2022},
volume={38},
number={5},
pages={3300-3313},
doi={10.1109/TRO.2022.3170281}}
Maintainer
This repository is maintained by:
| | | |:---:|:---:| | <img src="https://github.com/FabioBergonti.png" width="40"> | @FabioBergonti |
<p align="left"> <a href="https://github.com/ami-iit/paper_bergonti_2022_tro_kinematics-control-morphingcovers/blob/master/LICENSE"><img src="https://img.shields.io/github/license/ami-iit/paper_bergonti_2022_tro_kinematics-control-morphingcovers" alt="Size" class="center"/></a> <a href="https://github.com/ami-iit/paper_bergonti_2022_tro_kinematics-control-morphingcovers/actions/workflows/matlab_ci.yml"><img src="https://github.com/ami-iit/paper_bergonti_2022_tro_kinematics-control-morphingcovers/actions/workflows/matlab_ci.yml/badge.svg?branch=main" alt="CI"/></a> </p>Related Skills
node-connect
340.5kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
340.5kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.2kCommit, push, and open a PR
