A plugin to PyElastica for the simulation of HSA robots
This repository contains a plugin for PyElastica to simulate robots based on Handed Shearing Auxetics (HSA). Elastica makes use of the Discrete Cosserat Rod Model (DCM) to simulate the behaviour of slender rods. We model the HSA rods as Cosserat rods, but perform several modifications to the DCM to account for the auxetic behaviour of HSAs. Namely, we couple twist strains to an adjustment of the rest length of the rod. This will let the rod extend when torsional torques are applied to it. Additionally, the axial stiffness of the rod is modelled to be a linear function of the twist strain to account for a proportional increase of the spring constant with increasing twist angles, as shown by Good et al. [1] in their characterization of the mechanical properties of HSAs. We refer to the publication for more details.
Currently, we are able to simulate the behaviour of closed HSAs (i.e. the printed length is equal to the minimum length). Adaptations would be necessary to accommodate the simulation of semi-closed and open HSAs. Specifically, this would include non-linear couplings between the twist strains and the material properties such as the axial stiffness.
At the moment, the plugin is only able to simulate the behaviour of a single-segment HSA robot. This corresponds to a parallel arrangement of HSAs, where each HSA is connected to an electric actuator at its proximal end. All HSA rods are attached at their distal end to a (circular) platform. An extension to multi-segment HSA robots would require the implementation of different kinds of constraints, joints, etc.
Citation
This simulator is part of the publication Modelling Handed Shearing Auxetics:
Selective Piecewise Constant Strain Kinematics and Dynamic Simulation presented at the
6th IEEE-RAS International Conference on Soft Robotics (RoboSoft 2023).
You can find the publication online on IEEE Xplore.
Please use the following citation if you use our method in your (scientific) work:
@inproceedings{stolzle2023modelling,
title={Modelling Handed Shearing Auxetics: Selective Piecewise Constant Strain Kinematics and Dynamic Simulation},
author={St{\"o}lzle, Maximilian and Chin, Lillian and Truby, Ryan L. and Rus, Daniela and Della Santina, Cosimo},
booktitle={2023 IEEE 6th International Conference on Soft Robotics (RoboSoft)},
year={2023},
organization={IEEE}
}
Installation
The plugin can be installed from PyPI:
pip install hsa-pyelastica
or locally from the source code:
pip install .
Please note that this plugin is currently compatible with the PyElastica version 0.3.x. Any future changes in the private interface / API of PyElastica might break the plugin.
Usage
We provide two simulators: HsaRodSimulator and `HsaRobotSim`` to simulate individual HSA rods and assembled
HSA robots, respectively.
HsaRodSimulator
The HsaRodSimulator can be used to simulate the behaviour of individual HSAs.
First, we define the rod parameters:
</code></pre>
<h2 id="user-content-getting-started">Getting started<a href="#user-content-getting-started" aria-label="Link to heading 'Getting started'" data-heading-content="Getting started" class="anchor"></a></h2>
<p>We provide several scripts in the <code>examples</code> folder to get you started with the plugin.</p>
<h3 id="user-content-verification-of-simulator-against-experimental-results-by-good-et-al-1">Verification of simulator against experimental results by Good et al. <a href="#user-content-1">[1]</a><a href="#user-content-verification-of-simulator-against-experimental-results-by-good-et-al-1" aria-label="Link to heading 'Verification of simulator against experimental results by Good et al. [1]'" data-heading-content="Verification of simulator against experimental results by Good et al. [1]" class="anchor"></a></h3>
<p>The command</p>
<pre><code class="language-bash">python examples/hsa_rod/verification_sim_against_good_et_al/hsa_rod_steady_state_characterisation.py
simulates the steady-state behaviour of individual HSA rods to identify several mechanical characteristics such as holding torque, minimum energy length, spring constant, and blocked force. We have tuned the parameters of the simulator to match the experimental results of Good et al. [1] as closely as possible. Finally, we compare the results of the simulation with the experimental results to verify the steady-state behaviour of the simulator. This can be done by running the following command:
python examples/hsa_rod/verification_sim_against_good_et_al/plot_verification_sim_against_good_et_al.py
See also
You might also be interested in the following repositories:
- The
jax-spcs-kinematicsrepository contains an implementation of the Selective Piecewise Constant Strain (SPCS) kinematics in JAX. We have shown in our paper that this kinematic model is suitable for representing the shape of HSA rods. - You can find code and datasets used for the verification of the SPCS model for HSA robots in the
hsa-kinematic-modelrepository.
References
[1] Good, Ian, et al. "Expanding the Design Space for Electrically-Driven Soft Robots Through Handed Shearing Auxetics." 2022 International Conference on Robotics and Automation (ICRA). IEEE, 2022.
Metadata
Release files for hsa-pyelastica 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hsa-pyelastica-0.0.1.tar.gz | 58.1 kB | Without provenance | Details for hsa-pyelastica-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hsa_pyelastica-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for hsa_pyelastica-0.0.1-py3-none-any.whl |
Total release size: 94.5 kB
Release files / hsa-pyelastica-0.0.1.tar.gz
| Download URL | hsa-pyelastica-0.0.1.tar.gz |
|---|---|
| Size | 58.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93a9fb58abefecf843a65f62fea1809abf9d3425684424d1f81c113e62eaa666
|
|
BLAKE2b-256 checksum How to use checksums |
0972f99a48da8c11684d60d613d74a60033bd50bead4a54062117fb2ddd21006
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / hsa_pyelastica-0.0.1-py3-none-any.whl
| Download URL | hsa_pyelastica-0.0.1-py3-none-any.whl |
|---|---|
| Size | 36.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7b1649fae7be4d0651e478e0ed6447a3ef8dd08750df8528079b77375409477d
|
|
BLAKE2b-256 checksum How to use checksums |
8853c8937c7ada64cb26cb7ef5f79c9d4408608a6d466f39708dd2e45a9633c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Security for hsa-pyelastica 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.