Difference between revisions of "Pf users"
From DIDEAS Wiki
m (→SWIFI dataport) |
|||
(18 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{T_lab_pca}} | ||
+ | |||
+ | |||
{{pf_top_nav}} | {{pf_top_nav}} | ||
− | |||
=architecture= | =architecture= | ||
Line 6: | Line 8: | ||
=Development Environment= | =Development Environment= | ||
+ | |||
+ | To compile and download code. | ||
* MPLAB IDE > V8.1x | * MPLAB IDE > V8.1x | ||
− | * Microchip C30 compiler > V3.0 | + | * [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en535363 Microchip C30 compiler > V3.0] |
* ICD2 or Real-ice programmer connected to PSER1C connected to target board | * ICD2 or Real-ice programmer connected to PSER1C connected to target board | ||
Line 17: | Line 21: | ||
* [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en023073 Tools archive at Microchip] | * [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en023073 Tools archive at Microchip] | ||
* [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2573 Detailed reference manuals at Microchip] | * [http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2573 Detailed reference manuals at Microchip] | ||
+ | * Tortoise SVN is a great SVN client [http://tortoisesvn.net/downloads Tortoise] | ||
+ | |||
+ | * [[How to Load PF Firmware]] | ||
+ | |||
+ | =Data Collection= | ||
+ | |||
+ | Telemetry is performed using a SWIFI board which sends diagnostic data from the ankle to a PC or laptop via WIFI. A Python script communicates with the ankle while a Matlab program is used to plot the diagnostic data. | ||
+ | |||
+ | ==Software== | ||
+ | Currently python 2.5.4 is used to collect data, control the robot. More recent versions < 3.0 will likely work. | ||
+ | |||
+ | * [http://www.python.org/download/releases/2.5.4/ Python 2.5.4 download area] | ||
+ | ** [http://starship.python.net/crew/mhammond/win32/Downloads.html Windows specific support (PyWin32)] and the binary is [http://sourceforge.net/projects/pywin32/files/pywin32/Build%20214/pywin32-214.win32-py2.5.exe/download PyWin32_2.5_x86] | ||
+ | ** Numerical Python [http://sourceforge.net/projects/numpy/files/NumPy/1.3.0/numpy-1.3.0-win32-superpack-python2.5.exe/download numpy-1.3.0-win32-superpack-python2.5 library] | ||
+ | ** Python Serial Library Extension [http://sourceforge.net/projects/pyserial/files/pyserial/2.5/pyserial-2.5-rc1.win32.exe/download pyserial-2.5-rc1.win32] | ||
+ | ** create ''wifi_v3/wifilog'' directory | ||
+ | |||
+ | ==Network / Router Configuration (TBD)== | ||
+ | |||
+ | ==Telemetry Example== | ||
+ | * Open DOS command window | ||
+ | * Power on ankle and verify connection to SWIFI (sw5 shown): | ||
+ | ** ''ping 192.168.192.195'' | ||
+ | * Navigate to wifi script directory and start data collection script. To stop data collection, hit ESC key. | ||
+ | ** ''cd C:\ceb\0svn\pfcmd_python\wifi_v3'' | ||
+ | ** ''wifi_fast.py -i 192.168.192.195 -V hall2.vlist -F -f ss0103 | ||
+ | *** pre-hall sensor used imu2.vlist | ||
+ | * Open a new DOS command window and run Matlab | ||
+ | ** ''cd C:\ceb\0svn\matlab'' | ||
+ | ** ''matlab'' | ||
+ | ** Matlab should open. | ||
+ | ** Type in and run ''plot_laptoph.m'' | ||
+ | ** In Matlab Command window press <Enter> | ||
+ | ** A new GUI windows should open and data plotting should begin shortly. | ||
+ | * To stop data collection, hit ESC key in ''wifi_fast'' DOS window. Data are logged in ''wifilog'' subdirectory. | ||
+ | * To restart data collection, hit "up arrow" or retype command in ''wifi_fast'' DOS window. Note that every restart will create a fresh set of files with the base file name prefix and timestamp information postfix (e.g., ''ss0103_091101_140312.txt.bz2'') | ||
+ | * [[PF Manual Tuning|Tuning]] can be perfomed in ''wifi_fast'' DOS window. | ||
+ | * Save parameters to a file | ||
+ | ** ''cd C:\ceb\0svn\pfcmd_python'' | ||
+ | ** ''robo_config.py -i SW?? -I -RrSTCWeSTCW > ss0103.txt'' | ||
− | + | ==SWIFI wifi_fast dataport reference== | |
− | ==SWIFI dataport== | ||
* wifi_fast.py -i <ip address or name> [-p <matlab listen port>] -V <variable list filename> -F -f <log file name> | * wifi_fast.py -i <ip address or name> [-p <matlab listen port>] -V <variable list filename> -F -f <log file name> | ||
− | ** -i - the IP address of the SWIFI. Typical 192.168.192.xx or "sw8" | + | ** -i - the IP address of the SWIFI. Typical 192.168.192.xx or "sw8". xx is typically 191-198 where the last digit represents the SWIFI number. |
** -V specifies the format and names of the packets from the dataport. use : -V imu2.vlist | ** -V specifies the format and names of the packets from the dataport. use : -V imu2.vlist | ||
** -p (optional), default is 9999 - use if multiple plotters running simultaniously. If not 9999, before starting matlab plotter, assign the variable "matlab_listen_port" to some value in the range of 9990 and 9999 | ** -p (optional), default is 9999 - use if multiple plotters running simultaniously. If not 9999, before starting matlab plotter, assign the variable "matlab_listen_port" to some value in the range of 9990 and 9999 | ||
Line 32: | Line 75: | ||
** this appears to be a baud rate problem - and is being corrected. | ** this appears to be a baud rate problem - and is being corrected. | ||
* the wifi_fast.py directory is generally something (often \ceb or \cbarn\svn) \pfcmd_python\wifi_v3 | * the wifi_fast.py directory is generally something (often \ceb or \cbarn\svn) \pfcmd_python\wifi_v3 | ||
− | * example : wifi_fast.py -i sw5 -V imu2.vlist | + | * example : wifi_fast.py -F -i sw5 -V imu2.vlist -f ss0103_tuning |
− | ==matlab== | + | ==matlab reference== |
Matlab is used for 'real-time' plotting. | Matlab is used for 'real-time' plotting. | ||
Latest revision as of 18:53, 15 March 2012
Biomech Documentation links:
- Using the Powerfoot (Pf_users)
PF Users Navigation:
- PCB; Lifefix_users; Pf_users; benchtest_users; CalibFix Users; Hardware; Assembly ; iochan ;
- PCA : PCB ; AKENC SC/MC 218 ; FET 217 ; IMU219 ; Swifi ; Rev200_mods ; PCA Inventory
- Special Commands to the Ankle (PFCMD) : State Controller Commands; Motor Controller Commands; Python Examples; IMU Commands ;PFCMD_PY; Pf_calb_table_py; Virtual spring test; PF EEPROM
- DOC: Pf_users; Powerfoot Keyboard User Interface; Steps for Manual Tuning; "Dashboard" Program For Assisting with Tuning
- NEW (CEB) WIKI
- Torque Feedback Controller Guide
Contents
architecture
Pf_users; Pf_ui; Pf_study ; pf_arch_overview ; pf_comm_arch ; Pf_sc_arch ; Pf_mc_arch ; Pf_imu_arch ; Pf_defs ; Pf_insects [1]
Development Environment
To compile and download code.
- MPLAB IDE > V8.1x
- Microchip C30 compiler > V3.0
- ICD2 or Real-ice programmer connected to PSER1C connected to target board
- DOCs at Microchip
- Tools archive at Microchip
- Detailed reference manuals at Microchip
- Tortoise SVN is a great SVN client Tortoise
Data Collection
Telemetry is performed using a SWIFI board which sends diagnostic data from the ankle to a PC or laptop via WIFI. A Python script communicates with the ankle while a Matlab program is used to plot the diagnostic data.
Software
Currently python 2.5.4 is used to collect data, control the robot. More recent versions < 3.0 will likely work.
- Python 2.5.4 download area
- Windows specific support (PyWin32) and the binary is PyWin32_2.5_x86
- Numerical Python numpy-1.3.0-win32-superpack-python2.5 library
- Python Serial Library Extension pyserial-2.5-rc1.win32
- create wifi_v3/wifilog directory
Network / Router Configuration (TBD)
Telemetry Example
- Open DOS command window
- Power on ankle and verify connection to SWIFI (sw5 shown):
- ping 192.168.192.195
- Navigate to wifi script directory and start data collection script. To stop data collection, hit ESC key.
- cd C:\ceb\0svn\pfcmd_python\wifi_v3
- wifi_fast.py -i 192.168.192.195 -V hall2.vlist -F -f ss0103
- pre-hall sensor used imu2.vlist
- Open a new DOS command window and run Matlab
- cd C:\ceb\0svn\matlab
- matlab
- Matlab should open.
- Type in and run plot_laptoph.m
- In Matlab Command window press <Enter>
- A new GUI windows should open and data plotting should begin shortly.
- To stop data collection, hit ESC key in wifi_fast DOS window. Data are logged in wifilog subdirectory.
- To restart data collection, hit "up arrow" or retype command in wifi_fast DOS window. Note that every restart will create a fresh set of files with the base file name prefix and timestamp information postfix (e.g., ss0103_091101_140312.txt.bz2)
- Tuning can be perfomed in wifi_fast DOS window.
- Save parameters to a file
- cd C:\ceb\0svn\pfcmd_python
- robo_config.py -i SW?? -I -RrSTCWeSTCW > ss0103.txt
SWIFI wifi_fast dataport reference
- wifi_fast.py -i <ip address or name> [-p <matlab listen port>] -V <variable list filename> -F -f <log file name>
- -i - the IP address of the SWIFI. Typical 192.168.192.xx or "sw8". xx is typically 191-198 where the last digit represents the SWIFI number.
- -V specifies the format and names of the packets from the dataport. use : -V imu2.vlist
- -p (optional), default is 9999 - use if multiple plotters running simultaniously. If not 9999, before starting matlab plotter, assign the variable "matlab_listen_port" to some value in the range of 9990 and 9999
- -F (optional) - flush the SWIFI buffer at startup. The buffer could be holding upto ~2 mins of the past data.
- -f the base filename used for logging of the binary packet data, and ASC form of the packets.
- sometimes at power up, SWIFI outputs garbage. The solution is to power cycle the SWIFI until it works.
- this appears to be a baud rate problem - and is being corrected.
- the wifi_fast.py directory is generally something (often \ceb or \cbarn\svn) \pfcmd_python\wifi_v3
- example : wifi_fast.py -F -i sw5 -V imu2.vlist -f ss0103_tuning
matlab reference
Matlab is used for 'real-time' plotting.
- start matlab
- cd to C:\ceb\0svn\matlab (or the local version of svn://pedant/........./branches/cbarn/matlab)
- optionally set the variable "matlab_listen_port" to something in the 999x range.
- on the laptop generally use plot_laptop
- or on my PC, run the program "plot_float" and bypass the prompts.