WireX is a software library originally developed by Andreas Pott for the analysis and synthesis of cable-driven parallel robots. This README outlines the changes made to update the original WireX project for compatibility with Python 3.
Why not just use older python? - What's the fun in that, I needed a copy of the repo for work on my capstone project and thought why not try and see if I can change the whole thing to work with a newer/different versions of python, turns out it was quite easy! and also it was interesting exploring how the project was constructed as I planned to develop my own specific software to run my capstone.
The project has been updated to support Python 3, reflecting the discontinuation of support for Python 2. Below is a summary of the key changes:
- Replaced all Python 2 specific API calls with Python 3 equivalents.
- Updated module initialization to use
PyModuleDef
andPyInit
functions. - Changed the way strings are handled to accommodate Python 3's Unicode strings.
- Improved error handling to be more in line with Python 3 standards.
- Modified the build scripts and instructions to be compatible with Python 3 environments.
- Updated dependency information to ensure all libraries are compatible with Python 3.
To install and use the updated WireX library, follow these steps:
- Ensure you have Python 3.6 or higher installed.
- Clone the repository:
git clone https://github.com/gldkhoward/WireX.git
- Build the project (adjust commands as necessary):
cd wirex-master cmake . make
- Test the installation:
cd WiPy python > import WiPy
where the last command is entered without the > on the interactive python command line. The following can be used to test the lib:
> WiPy.Irobot.applyModel("IPAnema1Design")
True
> WiPy.Iws.calculateWorkspace()
True
> WiPy.Iws.calculateWorkspaceProperties()
{'volume': 5.731436529861277, 'surface': 17.789244457956457, 'CoI': (-4.2978881874605485e-17, -9.988050013112543e-18, 1.0000000000000002)}
where lines without the > are the expected response
Different version can probably be accomadated idk, things to change:
- Line 40 in WireLibPyBindings.h #include <python3.10/Python.h> -> your version
- Line 43 in WiPy/pyBindings.h #include <python3.10/Python.h> -> your version
The details above cover the very simple changes made to the existing project, for further information refer to the readMe within the project or the following: