SkillAgentSearch skills...

Mystica

mystica is a Matlab library for simulating multi-body robots relying on a maximal coordinate approach

Install / Use

/learn @ami-iit/Mystica
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<h1 align="left">mystica</h1> <p align="left"> <a href="https://github.com/ami-iit/mystica/blob/master/LICENSE"><img src="https://img.shields.io/github/license/ami-iit/mystica" alt="Size" class="center"/></a> <a href="https://github.com/ami-iit/mystica/actions/workflows/matlab_ci.yml"><img src="https://github.com/ami-iit/mystica/actions/workflows/matlab_ci.yml/badge.svg?branch=main" alt="CI"/></a> </p>

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

Other requisites are:

Both CasADi and yamlmatlab are downloaded and configured in the Installation section.

:floppy_disk: Installation

  1. Clone the repo:
git clone https://github.com/ami-iit/mystica.git
cd mystica
  1. 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.

<details> <summary>If you already have <a href="https://github.com/conda-forge/miniforge#mambaforge"><code>mambaforge</code></a></summary> If you already have <a href="https://github.com/conda-forge/miniforge#mambaforge"><code>mambaforge</code></a> configured, you can call the <a href="install.m"><code>install()</code></a> function by defining the <code>mambaforge_prefix</code> value: <pre><code>install('mambaforge_prefix',&#60;your mambaforge path prefix&#62;)</code></pre> </details>

⚠️ 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

View on GitHub
GitHub Stars10
CategoryDevelopment
Updated1y ago
Forks0

Languages

MATLAB

Security Score

80/100

Audited on Dec 17, 2024

No findings