API
4.5.1
For C++ developers
|
XsensDataReader is a class that reads files produced by IMU manufacturer Xsens and produces datatables from them. More...
Public Member Functions | |
XsensDataReader ()=default | |
XsensDataReader (const XsensDataReaderSettings &settings) | |
virtual | ~XsensDataReader ()=default |
XsensDataReader * | clone () const override |
const XsensDataReaderSettings & | getSettings () const |
Method to get const reference to the internal XsensDataReaderSettings object maintained by this reader. More... | |
XsensDataReaderSettings & | updSettings () |
Method to get writable reference to the internal XsensDataReaderSettings object maintained by this reader, to allow modification after construction. More... | |
Public Member Functions inherited from OpenSim::IMUDataReader | |
IMUDataReader ()=default | |
IMUDataReader (const IMUDataReader &)=default | |
IMUDataReader (IMUDataReader &&)=default | |
IMUDataReader & | operator= (const IMUDataReader &)=default |
IMUDataReader & | operator= (IMUDataReader &&)=default |
virtual | ~IMUDataReader ()=default |
Public Member Functions inherited from OpenSim::DataAdapter | |
DataAdapter ()=default | |
DataAdapter (const DataAdapter &)=default | |
DataAdapter (DataAdapter &&)=default | |
DataAdapter & | operator= (const DataAdapter &)=default |
DataAdapter & | operator= (DataAdapter &&)=default |
virtual | ~DataAdapter ()=default |
DataAdapter::OutputTables | read (const std::string &dataSourceSpecification) const |
Public interface to read data from a dataSourceSpecification, typically a file or folder. More... | |
const std::shared_ptr< AbstractDataTable > | getDataTable (const OutputTables &tables, const std::string tableName) |
Generic interface to retrieve a specific table by name from read result. More... | |
Protected Member Functions | |
DataAdapter::OutputTables | extendRead (const std::string &folderName) const override |
Typically, Xsens can export a trial as one .mtb file (binary that we can't parse) or as collection of ASCII text files that are tab delimited, one per sensor. More... | |
virtual void | extendWrite (const DataAdapter::InputTables &tables, const std::string &sinkName) const override |
Implements writing functionality, not implemented. More... | |
Protected Member Functions inherited from OpenSim::IMUDataReader | |
DataAdapter::OutputTables | createTablesFromMatrices (double dataRate, const std::vector< std::string > &labels, const std::vector< double > ×, const SimTK::Matrix_< SimTK::Quaternion > &rotationsData, const SimTK::Matrix_< SimTK::Vec3 > &linearAccelerationData, const SimTK::Matrix_< SimTK::Vec3 > &magneticHeadingData, const SimTK::Matrix_< SimTK::Vec3 > &angularVelocityData) const |
create a map of names to TimeSeriesTables. More... | |
Additional Inherited Members | |
Public Types inherited from OpenSim::DataAdapter | |
typedef std::map< std::string, std::shared_ptr< DataAdapter > > | RegisteredDataAdapters |
Type of the registry containing registered adapters. More... | |
typedef std::map< std::string, std::shared_ptr< AbstractDataTable > > | OutputTables |
Collection of tables returned by reading methods implemented in derived classes. More... | |
typedef std::map< std::string, const AbstractDataTable * > | InputTables |
Collection of tables accepted by writing methods implemented in derived classes. More... | |
Static Public Member Functions inherited from OpenSim::IMUDataReader | |
static const TimeSeriesTable_< SimTK::Quaternion_< double > > & | getOrientationsTable (const DataAdapter::OutputTables &tables) |
Custom accessors to retrieve tables of proper types without requiring users/scripters to cast. More... | |
static const TimeSeriesTableVec3 & | getLinearAccelerationsTable (const DataAdapter::OutputTables &tables) |
get table of LinearAccelerations as TimeSeriesTableVec3 More... | |
static const TimeSeriesTableVec3 & | getMagneticHeadingTable (const DataAdapter::OutputTables &tables) |
get table of MagneticHeading as TimeSeriesTableVec3 More... | |
static const TimeSeriesTableVec3 & | getAngularVelocityTable (const DataAdapter::OutputTables &tables) |
get table of AngularVelocity as TimeSeriesTableVec3 More... | |
Static Public Member Functions inherited from OpenSim::DataAdapter | |
static bool | registerDataAdapter (const std::string &identifier, const DataAdapter &adapter) |
Register a concrete DataAdapter by its unique string identifier. More... | |
Static Public Attributes inherited from OpenSim::IMUDataReader | |
static const std::string | Orientations |
static const std::string | LinearAccelerations |
static const std::string | MagneticHeading |
static const std::string | AngularVelocity |
Static Protected Member Functions inherited from OpenSim::DataAdapter | |
static std::shared_ptr< DataAdapter > | createAdapter (const std::string &identifier) |
Creator of concrete DataAdapter(s) for the specified source type by its unique identifier (string). More... | |
XsensDataReader is a class that reads files produced by IMU manufacturer Xsens and produces datatables from them.
This is intended to help consume IMU outputs.
|
default |
|
inline |
|
virtualdefault |
|
overridevirtual |
Implements OpenSim::DataAdapter.
|
overrideprotectedvirtual |
Typically, Xsens can export a trial as one .mtb file (binary that we can't parse) or as collection of ASCII text files that are tab delimited, one per sensor.
All of these files have a common prefix that indicates the trial, and a suffix that indicates the sensor (fixed across trials). Example: MT_012005D6_031-000_00B421AF.txt, MT_012005D6_031-000_00B4227B.txt for trial MT_012005D6_031-000_and sensors 00B421AF, 00B4227B respectively. The function below reads all files in the given folder name, with common prefix (same trial). It produces a list of tables depending on the contents of the files read.
Implements OpenSim::DataAdapter.
|
inlineoverrideprotectedvirtual |
Implements writing functionality, not implemented.
Implements OpenSim::DataAdapter.
|
inline |
Method to get const reference to the internal XsensDataReaderSettings object maintained by this reader.
|
inline |
Method to get writable reference to the internal XsensDataReaderSettings object maintained by this reader, to allow modification after construction.