Summary: We provide an SDK with limited functionality, and without support. It is sufficient for simple configuration and streaming, but not for full application development or advanced functionality like converting logged recordings or synchronizing with external systems using our Sync Box.
Often, researchers or clinicians need to integrate data from APDM's movement sensors into their own data collection workflow. In most cases, this data collection can all happen within our end-user software applications (e.g., Motion Studio, Mobility Lab, Moveo Explorer, ...). For example, these software packages can take advantage of our external Sync Box which enables accurate synchronization of recording events between many types of systems (e.g., video motion capture, gait mats, etc.).
In some cases, however, it is desirable to record directly within a different programming environment. For example, a researcher may be experimenting with real-time feedback or novel visualizations of streaming movement data. For these special cases, it may be desirable to communicate directly with our hardware and process the low-latency movement data using custom-built software.
To facilitate this use case, APDM makes available a subset of its internal SDK to our end users. This functionality enables researchers to configure our hardware, stream wireless movement data into another application of their own design, and to optionally save this data in our HDF format. We do not, however, support the use of the SDK or advanced features, such as firmware updates, external synchronization (with our Sync Box), and conversion of logged data files.
Here are some additional notes about our SDK:
- The latest release of the SDK can be found at: http://share.apdm.com/libraries/release/
- The posted release is always what is used in our latest software releases. Firmware versions are compatible.
- The download is password protected. By downloading this software, you indicate an understanding we do not offer support or troubleshooting assistance for the SDK. The username & password are both "SDK".
- There is auto-generated API documentation provided in the download, but not a lot of additional documentation. The API documentation currently includes lots of low-level functionality that end users will never use (it is 205 pages long). We are likely to prune this significantly in the future, as we reduce the scope of what is supported through our SDK for end users.
- Java (apdm.jar) and Python (apdm.py) bindings into the platform-specific native library are provided.
- There is example code for performing simple configuration and streaming in C, Java, and Python (version 2.7). These are set up to stream the data to our HDF format, but you can comment that out if you wish. We recommend sticking close to these examples for our hardware interaction, but you can do what you want with the streamed data (e.g., display it in realtime). We cannot offer assistance with troubleshooting the sample code.
- A common use case is configuring in Motion Studio (or another one of our applications), and then streaming using a custom-built application. This minimizes the custom code that has to be written.
- Matlab bindings are no longer provided. There are some functions in our library that simply cannot be called from within Matlab. We suggest using the Java interface from within Matlab in the future (you can interact directly with Java from within Matlab, and this approach overcomes a number of the issues with directly calling the libraries from within Matlab). See https://www.mathworks.com/help/matlab/using-java-libraries-in-matlab.html for more information on how to use Java libraries within Matlab.
Using the sample code
Here is some guidance on testing the Python and Java sample code that is distributed in the SDK.
Python
- Make sure you have Python 2 installed on your computer. You can test by issuing the following command: "python -V". Example output is "Python 2.7.10".
- Navigate to the folder named apdm_sdk/python. This folder contains the example files:
- autoconfigure_system.py
- stream_data.py
- Copy the platform dependent library and python bindigs from your platform's folder into this folder. For example, copy the files from apdm_sdk/python/MacOSX/x64/2.7/* into this folder.
- Make sure you have an access point plugged in, and Opal sensors docked which you wish to configure.
- Execute the following command to configure the system: "python autoconfigure_system.py"
- After this is complete, undock the Opals, wait until all of the LEDs are blinking green (Opals and access point), and issue the following command: "python stream_data.py". This function will stream data for 10,000 samples. The sample data is written to the screen (not to a file - although that is possible).
Java
- Make sure you have Java 8 installed on your computer. You can test by issuing the following command: "java -version". Example output is "java version "1.8.0_191"
- Navigate to the folder named apdm_sdk/java
- Copy the platform dependent library from your platform's folder into this folder. For example, copy the files from apdm_sdk/lib/MacOSX/x64/* into this folder.
- Compile the example code: "javac -cp ".:./apdm.jar" ConfigureAndStreamData.java"
- Make sure you have an access point plugged in, and Opal sensors docked which you wish to configure.
- Run the example code: "java -cp ".:./apdm.jar" ConfigureAndStreamData"
- This application will configure the Opals for streaming, prompt you to undock them when complete, and will then stream to a file named "recording.h5".
0 Comments