I am currently trying to follow the tutorial located at: https://simtk-confluence.stanford.edu:8 ... h+IMU+Data
This tutorial allows you to use IMU data to compute motions of body segments. I do not have access to MatLab so I am trying to follow the tutorial with Python. There are no Python examples on that tutorial so I'm trying to do it myself, and the tutorial mentions support for Python.
This issue is in step 2, and I am unable to create an orientation file from IMU sensor data. My current Python file is:
Code: Select all
import opensim as osim
import os
ROOT = "C:\OpenSim 4.4\Resources\Code\Python\OpenSenseExample"
xsensSettings = osim.XsensDataReaderSettings(os.path.join(ROOT, 'myIMUMappings.xml'))
xsensReader = osim.XsensDataReader(xsensSettings)
tables = xsensReader.read(os.path.join(ROOT, 'IMUData\\'))
quaternionTable = xsensReader.getOrientationsTable(tables)
trialPrefix = xsensSettings.get_trial_prefix()
osim.STOFileAdapterQuaternion.write(quaternionTable, [trialPrefix, '_orientations.sto'])
print("Done")
Code: Select all
TypeError: in method 'STOFileAdapterQuaternion_write', argument 2 of type 'std::string const &'
I would try using the CLI for OpenSense, but when I try to run it from the command line it tells me it is not recognized. Either way I would still prefer for it to work in Python.