FlexSEA Wiki

A WEARABLE ROBOTICS TOOLKIT

User Tools

Site Tools


pythonscripts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
pythonscripts [2020/07/10 18:31]
bbaig [Python Interface]
pythonscripts [2020/12/01 16:02]
casmat update python deps instructions, minor typo fixes
Line 3: Line 3:
 This document describes the Python scripts that demonstrate how to control the Actuator Package. These scripts are accompanied by and are dependent upon C based libraries for both Windows (.dll) and Unix (.so). Pre-compiled libraries are provided for Windows 32 and 64 bits, Raspberry Pi and Linux (Ubuntu). This document describes the Python scripts that demonstrate how to control the Actuator Package. These scripts are accompanied by and are dependent upon C based libraries for both Windows (.dll) and Unix (.so). Pre-compiled libraries are provided for Windows 32 and 64 bits, Raspberry Pi and Linux (Ubuntu).
  
-These scripts are written in Python 3 and have been tested on Python version 3.8 32 bit and 64 bit (using Windows 10 Pro), as well as 32 bit Rasbian on a Raspberry Pi 4 and Ubuntu 18 64 bits. Python versions lower than 3.7 are no longer supported. **We recommend using 3.7+ 32-bit for a new install.**+These scripts are written in Python 3 and have been tested on Python version 3.8 32 bit and 64 bit (using Windows 10 Pro), as well as 32-bit Rasbian on a Raspberry Pi 4 and Ubuntu 18 64 bits. Python versions lower than 3.7 are no longer supported. **We recommend using 3.7+ 32-bit for a new install.**
  
 The code is available on GitHub at [[https://​github.com/​DephyInc/​Actuator-Package/​tree/​develop|Actuator Package]]. This git repository contains the API, DLLs, and example scripts. The functions are documented in pyFlexsea.py. Additional documentation on the fx_plan_stack API can be found [[fx_plan_stack_api|here]]. The code is available on GitHub at [[https://​github.com/​DephyInc/​Actuator-Package/​tree/​develop|Actuator Package]]. This git repository contains the API, DLLs, and example scripts. The functions are documented in pyFlexsea.py. Additional documentation on the fx_plan_stack API can be found [[fx_plan_stack_api|here]].
  
 ===== Required Python packages ===== ===== Required Python packages =====
- +Follow the instructions on [[https://​github.com/​DephyInc/​Actuator-Package/​blob/​master/​README.md|the readme]] ​to install ​the Python dependencies according to your OS.
-Use pip to install ​numpy, matplotlib, tornado and scipy.+
  
 ===== Converting from Python interface 2.0 ===== ===== Converting from Python interface 2.0 =====
  
-The new Python interface addresses some short comings ​of the [[pythonscripts2|previous version]]. As the Python interface 2.0 is no longer supported, here is how to [[interface_conversion_3_to_4|port your legacy code]].+The new Python interface addresses some shortcomings ​of the [[pythonscripts2|previous version]]. As the Python interface 2.0 is no longer supported, here is how to [[interface_conversion_3_to_4|port your legacy code]].
  
 ===== Quick Start ===== ===== Quick Start =====
Line 50: Line 49:
 =====Matplotlib===== =====Matplotlib=====
  
-Some of the scripts (High-speed test, Impedance, etc.) include plotting. By default we use the WebAgg engine to show the plots in a browser.+Some of the scripts (High-speed test, Impedance, etc.) include plotting. By defaultwe use the WebAgg engine to show the plots in a browser.
 The first time you use the scripts you will need to install matplotlib and tornado (via pip). The first time you use the scripts you will need to install matplotlib and tornado (via pip).
 The plots will stop the Python program. A prompt will tell you how to get out of it. Typically, it's CTRL+C (Unix) or CTRL+BREAK (Windows). The plots will stop the Python program. A prompt will tell you how to get out of it. Typically, it's CTRL+C (Unix) or CTRL+BREAK (Windows).
Line 85: Line 84:
 </​code>​ </​code>​
  
-To use it, un-comment ​and/or modify the lines you need. Below is an example of that file used on Windows, with one port (COM5).+To use it, uncomment ​and/or modify the lines you need. Below is an example of that file used on Windows, with one port (COM5).
  
 __com.txt:​__ __com.txt:​__
Line 117: Line 116:
  
  
-=====Notes=====+===== Toubleshooting ​===== 
   * If you encounter problems with the DLLs, here are some [[generalhints|useful tips]].   * If you encounter problems with the DLLs, here are some [[generalhints|useful tips]].
-  * If your device has never had poles configured, you should run "find poles" from the demo script before trying other demos+  * If your device has never had poles configured, you should run "find poles" from the demo script before trying other demos. This is not typical! 
 +  * The leading cause of segmentation faults is a Device Spec mismatch between the embedded system and the scripts. This happens when you use old firmware with new scripts.
  
  
  
pythonscripts.txt · Last modified: 2021/01/30 03:52 by casmat