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.
Binary installers for the latest released version are available at the Python Package Index (PyPI).
pip install pyiptp
Dependencies
- NumPy
- Scipy
- lxml
- Matplotlib (soft dependency)
Build and install from sources
With the following procedures the package can be built on Windows and Linux starting from the source code in the repository.
If you want to modify the Cython source code and compile the modified version, before building you need to follow to the developer instructions.
We suggest to compile pyIPTP using Anaconda Python 3 distribution.
First install required dependencies:
conda install numpy scipy lxml matplotlib
If you have modified the Cython source or plan to modify it, go to the next section, otherwise skip directly to the Windows or Linux build.
Developer instructions
If Cython code has been changed, to compile pyIPTP and apply changes you need Cython in addition to the normal dependencies above. Cython can be installed from PyPI, or from Conda:
conda install -c anaconda cython
As an additional step is required to change the value of the global variable USE_CYTHON in setup.py file to True. This will also compile the Cython code.
USE_CYTHON = True
Now proceed to the Windows or Linux section depending on the operating system in use.
Build on Windows
If you work on Windows, you will need a C++ compiler. In this regard see Windows compilers documentation. We use the TDM-GCC 10.3.0 compiler.
Additional package are needed to build on Windows: Install libpython and m2w64-toolchain:
conda install -c anaconda libpython
conda install -c msys2 m2w64-toolchain
Now to compile pyIPTP, execute the compile_win64.bat
file in the python_iptp
directory:
compile_win64.bat
Build on Linux
On Linux there is no need for additional packages. Proceed with the build with the command:
python setup.py build_ext -i
Installation
After completing the build you can proceed with the installation with the command:
python setup.py install
License
All contributors
- Marco Riboli, Fabio Corradini [core]
- Marco Silvestri, Rinaldo Garziera [conceptualization]
- 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.