Metadata-Version: 2.4
Name: jsrm
Version: 0.0.15
Summary: Kinematic and dynamic models of continuum and articulated soft robots.
Author-email: Maximilian Stölzle <maximilian@stoelzle.ch>
Maintainer-email: Maximilian Stölzle <maximilian@stoelzle.ch>
License: Copyright (c) 2016 The Python Packaging Authority (PyPA)
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of
        this software and associated documentation files (the "Software"), to deal in
        the Software without restriction, including without limitation the rights to
        use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
        of the Software, and to permit persons to whom the Software is furnished to do
        so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/tud-cor-sr/jax-soft-robot-modelling
Project-URL: Bug Reports, https://github.com/tud-cor-sr/jax-soft-robot-modelling/issues
Project-URL: Source, https://github.com/tud-cor-sr/jax-soft-robot-modelling
Keywords: JAX,Soft Robotics,Kinematics,Dynamics
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: dill
Requires-Dist: jax
Requires-Dist: numpy
Requires-Dist: peppercorn
Requires-Dist: sympy>=1.11
Provides-Extra: dev
Requires-Dist: bump2version; extra == "dev"
Requires-Dist: check-manifest; extra == "dev"
Requires-Dist: codecov; extra == "dev"
Requires-Dist: coverage; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: pytest-html; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: tox; extra == "dev"
Provides-Extra: examples
Requires-Dist: diffrax; extra == "examples"
Requires-Dist: jaxopt; extra == "examples"
Requires-Dist: matplotlib; extra == "examples"
Requires-Dist: opencv-python; extra == "examples"
Requires-Dist: scipy; extra == "examples"
Provides-Extra: test
Requires-Dist: codecov; extra == "test"
Requires-Dist: coverage; extra == "test"
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: pytest-html; extra == "test"
Requires-Dist: tox; extra == "test"
Dynamic: license-file

# JAX Soft Robot Modelling

This repository contains symbolic derivations of the kinematics and dynamics of various soft robots using Sympy.
The symbolic expressions are then implemented in JAX and can be used for fast, parallelizable, and differentiable simulations.
So far, we have focused on planar settings and implemented the following soft robots:

- [N-link pendulum](examples/simulate_pendulum.py)
- [Planar Piecewise Constant Strain (PCS) continuum soft robot](examples/simulate_planar_pcs.py)
- [Planar Handed Shearing Auxetics (HSA) robot](examples/simulate_planar_hsa.py)

We are happy to receive contributions for other soft robots and/or other settings (e.g., 3D).

## Citation

This simulator is part of the publication **An Experimental Study of Model-based Control
for Planar Handed Shearing Auxetics Robots** presented at the _18th International Symposium on Experimental Robotics_. 
You can find the publication online in the Springer Proceedings on Advanced Robotics (SPAR): https://doi.org/10.1007/978-3-031-63596-0_14

Please use the following citation if you use our software in your (scientific) work:

```bibtex
@inproceedings{stolzle2023experimental,
  title={An experimental study of model-based control for planar handed shearing auxetics robots},
  author={St{\"o}lzle, Maximilian and Rus, Daniela and Della Santina, Cosimo},
  booktitle={International Symposium on Experimental Robotics},
  pages={153--167},
  year={2023},
  organization={Springer}
}
```

## Installation

The plugin can be installed from PyPI:

```bash
pip install jsrm
```

or locally from the source code:

```bash
pip install -e .
```

If you want to run the examples, you will also need to install the following dependencies:

```bash
pip install -e ".[examples]"
```

## Usage

Always first source all necessary environment variables when opening a new terminal:

```bash
source 01-configure-env-vars.sh
```

Then, we can symbolically derive the pendulum kinematics and dynamics:

```bash
python examples/derive_pendulum.py
```

Finally, we can simulate the pendulum
```bash
python examples/simulate_pendulum.py
```

## See also

You might also be interested in the following repositories:
 - The [`jax-spcs-kinematics`](https://github.com/tud-phi/jax-spcs-kinematics) repository 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.
 - The [`HSA-PyElastica`](https://github.com/tud-phi/HSA-PyElastica) repository contains a plugin for PyElastica
for the simulation of HSA robots.
 - The [`hsa-planar-control`](https://github.com/tud-phi/hsa-planar-control) repository contains JAX and ROS2 implementations
 of model-based control algorithms for planar HSA robots.
