python-iptp 0.1.0
Iso-Parametric Trajectory Planning python toolkit
License: BSD-3-Clause
Requires Python: >=3.6

<div align="center">
  <img src="branding/python_iptp_logo.svg"><br>
</div>

-----------------

# pyIPTP - IsoParametric Trajectory Planning python toolkit
## What is it?
**pyIPTP** is a Python 3 package that provides several tools to design trajectories in the joint space, combining the OOP approach with the feature of imposing arbitrary constraints on n-th derivatives or anti-derivatives using iterative loops. The adopted approach uses univariate B-splines to parameterize trajectory pieces, which are then concatenated to build a piecewise trajectory. Working on a parametric data structure, the tool offers many functions of shape modeling and symbolic calculation by actually describing a small **CAD** for trajectories.  These functions, combined appropriately, define macro-instructions that can be reused in several application cases and with which the trajectory is defined with I/O block logic, thus dividing the entire trajectory planning into simpler problems. Additionally, it has the broader goal of becoming the new standard in electric axis control in **the fields of robotic and industrial automation**.

## Main Features

Some good reasons to use this library are:

* trajectory planning in joints space for robotic applications;
* synthesis and study of automatic machines, such as cam mechanisms or articulated systems;
* dynamic simulation of the mechatronic systems;
* teaching.

## Where to get it
The source code is currently hosted on GitHub [here](https://github.com/projectcamomile/python_iptp).

Binary installers for the latest released version are available at the [Python Package Index (PyPI)]() and on [Conda](https://docs.conda.io/en/latest/).

```sh
# conda
conda install python_iptp
```

```sh
# or PyPI
pip install python_iptp
```
## Dependencies
- [NumPy](https://www.numpy.org)
- [Scipy](https://www.scipy.org)
- [lxml.](https://lxml.de/)
- [Matplotlib](https://matplotlib.org/) <span style="color: grey;">(soft dependency)</span>

## Install from sources
In the `python_iptp` directory (same one where you found this file after cloning the git repository), execute:

```
python setup.py install
```

## Compile pyIPTP

To compile **pyIPTP** from source you need [Cython](https://cython.org/) in addition to the normal dependencies above. Cython can be installed from [PyPI](), and from [Conda](https://docs.conda.io/en/latest/):

```sh
# conda
conda install -c anaconda cython
```

```sh
# or PyPI
pip install cython
```
If you work on Windows, you will also need a C ++ compiler. In this regard see [Windows compilers documentation](https://wiki.python.org/moin/WindowsCompilers). We use the [TDM-GCC 9.2.0](https://jmeubank.github.io/tdm-gcc/) compiler.

Create a `distutils.cfg` file (by using the notepad) with the following contents in the folder `\Lib\distutils` in Python install directory:

```
[build]
compiler=mingw32

[build_ext]
compiler=mingw32
```

Install [libpython](https://pypi.org/project/libpython/) and [m2w64-toolchain](https://anaconda.org/msys2/m2w64-toolchain):
```sh
conda install -c anaconda libpython
conda install -c msys2 m2w64-toolchain
```

Before compiling it is necessary to switch the `USE_CYTHON` flag to **<span style="color: purple;">True</span>** (Remember to switch it back to **<span style="color: purple;">False</span>** later!). Now to compile **pyIPTP**, execute the `compile_win64.bat` file in the `python_iptp` directory:

```
compile_win64
```


## License

[BSD 3](LICENSE)

## All contributors
* Marco Riboli, Fabio Corradini, Marco Silvestri [core]
* Alessandra Aimi [B-splines mathematical background]

## Contributing to pyIPTP

All contributions, bug reports, bug fixes, documentation improvements, enhancements and ideas are welcome. Feel free to ask questions on [info@camomile.dev](info@camomile.dev).