Biorbd
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
biorbd::rigidbody::KalmanReconsMarkers Class Reference

Class Kinematic reconstruction algorithm using an Extended Kalman Filter using skin markers. More...

#include <KalmanReconsMarkers.h>

Inheritance diagram for biorbd::rigidbody::KalmanReconsMarkers:
biorbd::rigidbody::KalmanRecons

Public Member Functions

 KalmanReconsMarkers ()
 Initialize the Kalman filter and Kalman reconstruction for Markers data.
 
 KalmanReconsMarkers (biorbd::Model &model, biorbd::rigidbody::KalmanParam params=biorbd::rigidbody::KalmanParam())
 Initialize the Kalman filter and Kalman reconstruction for Markers data. More...
 
biorbd::rigidbody::KalmanReconsMarkers DeepCopy () const
 Deep copy of the Kalman reconstruction. More...
 
void DeepCopy (const biorbd::rigidbody::KalmanReconsMarkers &other)
 Deep copy of the Kalman reconstruction. More...
 
virtual void reconstructFrame (biorbd::Model &model, const biorbd::rigidbody::Markers &Tobs, biorbd::rigidbody::GeneralizedCoordinates *Q, biorbd::rigidbody::GeneralizedVelocity *Qdot, biorbd::rigidbody::GeneralizedAcceleration *Qddot, bool removeAxes=true)
 Reconstruct the kinematics from markers data. More...
 
virtual void reconstructFrame (biorbd::Model &model, const std::vector< biorbd::rigidbody::NodeSegment > &Tobs, biorbd::rigidbody::GeneralizedCoordinates *Q, biorbd::rigidbody::GeneralizedVelocity *Qdot, biorbd::rigidbody::GeneralizedAcceleration *Qddot, bool removeAxes=true)
 Reconstruct the kinematics from markers data. More...
 
virtual void reconstructFrame (biorbd::Model &model, const biorbd::utils::Vector &Tobs, biorbd::rigidbody::GeneralizedCoordinates *Q=nullptr, biorbd::rigidbody::GeneralizedVelocity *Qdot=nullptr, biorbd::rigidbody::GeneralizedAcceleration *Qddot=nullptr, bool removeAxes=true)
 Reconstruct the kinematics from markers data. More...
 
virtual void reconstructFrame ()
 This function cannot be used to reconstruct frames.
 
bool first ()
 Return if the first iteration was done. More...
 
- Public Member Functions inherited from biorbd::rigidbody::KalmanRecons
 KalmanRecons ()
 Kalman reconstruction.
 
 KalmanRecons (biorbd::Model &model, unsigned int nbMeasure, KalmanParam params=KalmanParam())
 Kalman reconstruction. More...
 
virtual ~KalmanRecons ()
 Destroy class properly.
 
void DeepCopy (const biorbd::rigidbody::KalmanRecons &other)
 Deep copy of Kalman reconstruction. More...
 
void getState (biorbd::rigidbody::GeneralizedCoordinates *Q=nullptr, biorbd::rigidbody::GeneralizedVelocity *Qdot=nullptr, biorbd::rigidbody::GeneralizedAcceleration *Qddot=nullptr)
 Get the state (Q, Qdot, Qddot) More...
 
void setInitState (const biorbd::rigidbody::GeneralizedCoordinates *Q=nullptr, const biorbd::rigidbody::GeneralizedVelocity *Qdot=nullptr, const biorbd::rigidbody::GeneralizedAcceleration *Qddot=nullptr)
 Set the initial guess of the reconstruction. More...
 

Protected Member Functions

virtual void initialize ()
 Initialization of the filter.
 
virtual void manageOcclusionDuringIteration (biorbd::utils::Matrix &InvTp, biorbd::utils::Vector &measure, const std::vector< unsigned int > &occlusion)
 Manage the occlusion during the iteration. More...
 
- Protected Member Functions inherited from biorbd::rigidbody::KalmanRecons
biorbd::utils::Matrix evolutionMatrix (const unsigned int m, unsigned int n, double Te)
 Create the evolution matrix. More...
 
biorbd::utils::Matrix processNoiseMatrix (const unsigned int nbQ, double Te)
 Process the noise matrix. More...
 
biorbd::utils::Matrix measurementNoiseMatrix (const unsigned int nbT, double val)
 Matrix of the noise on the measurements. More...
 
biorbd::utils::Matrix initCovariance (const unsigned int nbQ, double val)
 Returns a initialized covianriance matrix. More...
 
biorbd::rigidbody::GeneralizedCoordinates initState (const unsigned int nbQ)
 Initialize the states. More...
 
void iteration (biorbd::utils::Vector measure, const biorbd::utils::Vector &projectedMeasure, const biorbd::utils::Matrix &Hessian, const std::vector< unsigned int > &occlusion=std::vector< unsigned int >())
 Compute an iteration of the Kalman filter. More...
 

Protected Attributes

std::shared_ptr< biorbd::utils::Matrixm_PpInitial
 Initial covariance matrix.
 
std::shared_ptr< bool > m_firstIteration
 If first iteration was done.
 
- Protected Attributes inherited from biorbd::rigidbody::KalmanRecons
std::shared_ptr< KalmanParamm_params
 The parameters of the Kalman filter.
 
std::shared_ptr< double > m_Te
 Inherent parameter to the frequency.
 
std::shared_ptr< unsigned int > m_nbDof
 Number of states.
 
std::shared_ptr< unsigned int > m_nMeasure
 Number of measurements.
 
std::shared_ptr< biorbd::utils::Vectorm_xp
 State vector.
 
std::shared_ptr< biorbd::utils::Matrixm_A
 Evolution matrix.
 
std::shared_ptr< biorbd::utils::Matrixm_Q
 Noise matrix.
 
std::shared_ptr< biorbd::utils::Matrixm_R
 Matrix of the noise on the measurements.
 
std::shared_ptr< biorbd::utils::Matrixm_Pp
 Covariance matrix.
 

Detailed Description

Class Kinematic reconstruction algorithm using an Extended Kalman Filter using skin markers.

Definition at line 16 of file KalmanReconsMarkers.h.

Constructor & Destructor Documentation

◆ KalmanReconsMarkers()

biorbd::rigidbody::KalmanReconsMarkers::KalmanReconsMarkers ( biorbd::Model model,
biorbd::rigidbody::KalmanParam  params = biorbd::rigidbody::KalmanParam() 
)

Initialize the Kalman filter and Kalman reconstruction for Markers data.

Parameters
modelThe joint model
paramsThe Kalman filter parameters

Definition at line 22 of file KalmanReconsMarkers.cpp.

Member Function Documentation

◆ DeepCopy() [1/2]

biorbd::rigidbody::KalmanReconsMarkers biorbd::rigidbody::KalmanReconsMarkers::DeepCopy ( ) const

Deep copy of the Kalman reconstruction.

Returns
Copy of the Kalman reconstruction

Definition at line 35 of file KalmanReconsMarkers.cpp.

◆ DeepCopy() [2/2]

void biorbd::rigidbody::KalmanReconsMarkers::DeepCopy ( const biorbd::rigidbody::KalmanReconsMarkers other)

Deep copy of the Kalman reconstruction.

Parameters
otherThe Kalman reconstruction to copy

Definition at line 42 of file KalmanReconsMarkers.cpp.

◆ first()

bool biorbd::rigidbody::KalmanReconsMarkers::first ( )

Return if the first iteration was done.

Returns
If the first iteration was done

Definition at line 68 of file KalmanReconsMarkers.cpp.

◆ manageOcclusionDuringIteration()

void biorbd::rigidbody::KalmanReconsMarkers::manageOcclusionDuringIteration ( biorbd::utils::Matrix InvTp,
biorbd::utils::Vector measure,
const std::vector< unsigned int > &  occlusion 
)
protectedvirtual

Manage the occlusion during the iteration.

Parameters
InvTpThe inverse of the Tp matrix
measureThe vector actual measurement to track
occlusionThe vector where occlusions occurs

Reimplemented from biorbd::rigidbody::KalmanRecons.

Definition at line 56 of file KalmanReconsMarkers.cpp.

◆ reconstructFrame() [1/3]

void biorbd::rigidbody::KalmanReconsMarkers::reconstructFrame ( biorbd::Model model,
const biorbd::rigidbody::Markers Tobs,
biorbd::rigidbody::GeneralizedCoordinates Q,
biorbd::rigidbody::GeneralizedVelocity Qdot,
biorbd::rigidbody::GeneralizedAcceleration Qddot,
bool  removeAxes = true 
)
virtual

Reconstruct the kinematics from markers data.

Parameters
modelThe joint model
TobsThe observed markers
QThe generalized coordinates
QdotThe generalized velocities
QddotThe generalized accelerations
removeAxesIf the algo should ignore or not the removeAxis defined in the bioMod file

Definition at line 73 of file KalmanReconsMarkers.cpp.

◆ reconstructFrame() [2/3]

void biorbd::rigidbody::KalmanReconsMarkers::reconstructFrame ( biorbd::Model model,
const biorbd::utils::Vector Tobs,
biorbd::rigidbody::GeneralizedCoordinates Q = nullptr,
biorbd::rigidbody::GeneralizedVelocity Qdot = nullptr,
biorbd::rigidbody::GeneralizedAcceleration Qddot = nullptr,
bool  removeAxes = true 
)
virtual

Reconstruct the kinematics from markers data.

Parameters
modelThe joint model
TobsThe observed markers in a column-major vector
QThe generalized coordinates
QdotThe generalized velocities
QddotThe generalized accelerations
removeAxesIf the algo should ignore or not the removeAxis defined in the bioMod file

Definition at line 106 of file KalmanReconsMarkers.cpp.

◆ reconstructFrame() [3/3]

void biorbd::rigidbody::KalmanReconsMarkers::reconstructFrame ( biorbd::Model model,
const std::vector< biorbd::rigidbody::NodeSegment > &  Tobs,
biorbd::rigidbody::GeneralizedCoordinates Q,
biorbd::rigidbody::GeneralizedVelocity Qdot,
biorbd::rigidbody::GeneralizedAcceleration Qddot,
bool  removeAxes = true 
)
virtual

Reconstruct the kinematics from markers data.

Parameters
modelThe joint model
TobsThe observed markers
QThe generalized coordinates
QdotThe generalized velocities
QddotThe generalized accelerations
removeAxesIf the algo should ignore or not the removeAxis defined in the bioMod file

Definition at line 89 of file KalmanReconsMarkers.cpp.


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