Biorbd
Static Public Member Functions | List of all members
biorbd::Reader Class Reference

Reader for bioMod files. More...

#include <ModelReader.h>

Static Public Member Functions

static biorbd::Model readModelFile (const biorbd::utils::Path &path)
 Create a biorbd model from a bioMod file. More...
 
static void readModelFile (const biorbd::utils::Path &path, biorbd::Model *model)
 Create a biorbd model from a bioMod file. More...
 
static std::vector< std::vector< biorbd::utils::Vector3d > > readMarkerDataFile (const utils::Path &path)
 Read a bioMark file, containing markers data. More...
 
static std::vector< biorbd::rigidbody::GeneralizedCoordinatesreadQDataFile (const biorbd::utils::Path &path)
 Read a bioKin file, containing kinematics data. More...
 
static std::vector< biorbd::utils::VectorreadActivationDataFile (const biorbd::utils::Path &path)
 Read a bioMus fine, containing muscle activations data. More...
 
static std::vector< biorbd::utils::VectorreadTorqueDataFile (const biorbd::utils::Path &path)
 Read a bioTorque file containing generalized torques data. More...
 
static std::vector< biorbd::utils::VectorreadGroundReactionForceDataFile (const biorbd::utils::Path &path)
 Read a bioGRF file containing ground reaction force (GRF) data. More...
 
static void readViconForceFile (const biorbd::utils::Path &path, std::vector< std::vector< unsigned int >> &frame, std::vector< unsigned int > &frequency, std::vector< std::vector< biorbd::utils::Vector3d >> &force, std::vector< std::vector< biorbd::utils::Vector3d >> &moment, std::vector< std::vector< biorbd::utils::Vector3d >> &cop)
 Read a Vicon ASCII force file. More...
 
static std::vector< std::vector< biorbd::utils::SpatialVector > > readViconForceFile (const biorbd::utils::String &path)
 Read a Vicon ASCII force file. More...
 
static std::vector< std::vector< biorbd::utils::Vector3d > > readViconMarkerFile (const biorbd::utils::Path &path, int nFramesToGet=-1)
 Read a Vicon ASCII marker file (CSV formated) More...
 
static std::vector< std::vector< biorbd::utils::Vector3d > > readViconMarkerFile (const biorbd::utils::Path &path, std::vector< biorbd::utils::String > &markOrder, int nFramesToGet=-1)
 Read a Vicon ASCII marker file (CSV formated) More...
 
static biorbd::rigidbody::Mesh readMeshFileBiorbdSegments (const biorbd::utils::Path &path)
 Read a bioMesh file containing the meshing of a segment. More...
 
static biorbd::rigidbody::Mesh readMeshFilePly (const biorbd::utils::Path &path)
 Read a PLY file containing the meshing of a segment. More...
 
static biorbd::rigidbody::Mesh readMeshFileObj (const biorbd::utils::Path &path)
 Read a OBJ file containing the meshing of a segment. More...
 

Detailed Description

Reader for bioMod files.

Definition at line 26 of file ModelReader.h.

Member Function Documentation

◆ readActivationDataFile()

std::vector< biorbd::utils::Vector > biorbd::Reader::readActivationDataFile ( const biorbd::utils::Path path)
static

Read a bioMus fine, containing muscle activations data.

Parameters
pathThe path of the file
Returns
Returns the activations

Definition at line 1128 of file ModelReader.cpp.

◆ readGroundReactionForceDataFile()

std::vector< biorbd::utils::Vector > biorbd::Reader::readGroundReactionForceDataFile ( const biorbd::utils::Path path)
static

Read a bioGRF file containing ground reaction force (GRF) data.

Parameters
pathThe path of the file
Returns
Returns the ground reaction force

Definition at line 1241 of file ModelReader.cpp.

◆ readMarkerDataFile()

std::vector< std::vector< biorbd::utils::Vector3d > > biorbd::Reader::readMarkerDataFile ( const utils::Path path)
static

Read a bioMark file, containing markers data.

Parameters
pathThe path of the file
Returns
Returns the markers

Definition at line 1014 of file ModelReader.cpp.

◆ readMeshFileBiorbdSegments()

biorbd::rigidbody::Mesh biorbd::Reader::readMeshFileBiorbdSegments ( const biorbd::utils::Path path)
static

Read a bioMesh file containing the meshing of a segment.

Parameters
pathThe path of the file
Returns
Returns the mesh

Definition at line 1564 of file ModelReader.cpp.

◆ readMeshFileObj()

biorbd::rigidbody::Mesh biorbd::Reader::readMeshFileObj ( const biorbd::utils::Path path)
static

Read a OBJ file containing the meshing of a segment.

Parameters
pathThe path of the file
Returns
Returns the mesh

Definition at line 1690 of file ModelReader.cpp.

◆ readMeshFilePly()

biorbd::rigidbody::Mesh biorbd::Reader::readMeshFilePly ( const biorbd::utils::Path path)
static

Read a PLY file containing the meshing of a segment.

Parameters
pathThe path of the file
Returns
Returns the mesh

Definition at line 1623 of file ModelReader.cpp.

◆ readModelFile() [1/2]

biorbd::Model biorbd::Reader::readModelFile ( const biorbd::utils::Path path)
static

Create a biorbd model from a bioMod file.

Parameters
pathThe path of the file

Definition at line 44 of file ModelReader.cpp.

◆ readModelFile() [2/2]

void biorbd::Reader::readModelFile ( const biorbd::utils::Path path,
biorbd::Model model 
)
static

Create a biorbd model from a bioMod file.

Parameters
pathThe path of the file
modelThe model to fill
Returns
Returns the model to fill

Definition at line 52 of file ModelReader.cpp.

◆ readQDataFile()

std::vector< biorbd::rigidbody::GeneralizedCoordinates > biorbd::Reader::readQDataFile ( const biorbd::utils::Path path)
static

Read a bioKin file, containing kinematics data.

Parameters
pathThe path of the file
Returns
Returns the kinematics

Definition at line 1073 of file ModelReader.cpp.

◆ readTorqueDataFile()

std::vector< biorbd::utils::Vector > biorbd::Reader::readTorqueDataFile ( const biorbd::utils::Path path)
static

Read a bioTorque file containing generalized torques data.

Parameters
pathThe path of the file
Returns
Returns the torque

Definition at line 1183 of file ModelReader.cpp.

◆ readViconForceFile() [1/2]

void biorbd::Reader::readViconForceFile ( const biorbd::utils::Path path,
std::vector< std::vector< unsigned int >> &  frame,
std::vector< unsigned int > &  frequency,
std::vector< std::vector< biorbd::utils::Vector3d >> &  force,
std::vector< std::vector< biorbd::utils::Vector3d >> &  moment,
std::vector< std::vector< biorbd::utils::Vector3d >> &  cop 
)
static

Read a Vicon ASCII force file.

Parameters
pathThe path of the file
frameThe fame vector (output)
frequencyThe acquisition frequency (output)
forceThe linear forces (x,y,z) (output)
momentThe moments (x,y,z) (output)
copThe center of pressure (x,y,z) (output)

Definition at line 1298 of file ModelReader.cpp.

◆ readViconForceFile() [2/2]

std::vector< std::vector< biorbd::utils::SpatialVector > > biorbd::Reader::readViconForceFile ( const biorbd::utils::String path)
static

Read a Vicon ASCII force file.

Parameters
pathThe path of the file
Returns
Returns all the data in a spatial transform format

Definition at line 1392 of file ModelReader.cpp.

◆ readViconMarkerFile() [1/2]

std::vector< std::vector< biorbd::utils::Vector3d > > biorbd::Reader::readViconMarkerFile ( const biorbd::utils::Path path,
int  nFramesToGet = -1 
)
static

Read a Vicon ASCII marker file (CSV formated)

Parameters
pathThe path of the file
nFramesToGetThe number of frames

If the number of frame asked is less than the total number of frames, frames are evenly skip while reading. To get all frames, nFramesToGet should be set to -1.

Definition at line 1843 of file ModelReader.cpp.

◆ readViconMarkerFile() [2/2]

std::vector< std::vector< biorbd::utils::Vector3d > > biorbd::Reader::readViconMarkerFile ( const biorbd::utils::Path path,
std::vector< biorbd::utils::String > &  markOrder,
int  nFramesToGet = -1 
)
static

Read a Vicon ASCII marker file (CSV formated)

Parameters
pathThe path of the file
markOrderThe markers to keep
nFramesToGetThe number of frames
Returns
Returns the data

markOrder can be used for both changing the order of the marker to read and to skip some markers

If the number of frame asked is less than the total number of frames, frames are evenly skip while reading. To get all frames, nFramesToGet should be set to -1.

Definition at line 1416 of file ModelReader.cpp.


The documentation for this class was generated from the following files: