Biorbd Release_1.13.0
Loading...
Searching...
No Matches
BIORBD_NAMESPACE::rigidbody::KalmanReconsMarkers Class Reference

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

#include <KalmanReconsMarkers.h>

Inheritance diagram for BIORBD_NAMESPACE::rigidbody::KalmanReconsMarkers:
BIORBD_NAMESPACE::rigidbody::KalmanRecons

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

std::shared_ptr< utils::Matrix > m_PpInitial
 Initial covariance matrix.
std::shared_ptr< bool > m_firstIteration
 If first iteration was done.
Protected Attributes inherited from BIORBD_NAMESPACE::rigidbody::KalmanRecons
std::shared_ptr< KalmanParam > m_params
 The parameters of the Kalman filter.
std::shared_ptr< double > m_Te
 Inherent parameter to the frequency.
std::shared_ptr< size_t > m_nbDof
 Number of states.
std::shared_ptr< size_t > m_nMeasure
 Number of measurements.
std::shared_ptr< utils::Vector > m_xp
 State vector.
std::shared_ptr< utils::Matrix > m_A
 Evolution matrix.
std::shared_ptr< utils::Matrix > m_Q
 Noise matrix.
std::shared_ptr< utils::Matrix > m_R
 Matrix of the noise on the measurements.
std::shared_ptr< utils::Matrix > m_Pp
 Covariance matrix.

Detailed Description

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

Definition at line 17 of file KalmanReconsMarkers.h.

Constructor & Destructor Documentation

◆ KalmanReconsMarkers() [1/2]

rigidbody::KalmanReconsMarkers::KalmanReconsMarkers ( )

Initialize the Kalman filter and Kalman reconstruction for Markers data.

Definition at line 20 of file KalmanReconsMarkers.cpp.

◆ KalmanReconsMarkers() [2/2]

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

Initialize the Kalman filter and Kalman reconstruction for Markers data.

Parameters
modelThe joint model
paramsThe Kalman filter parameters

Definition at line 25 of file KalmanReconsMarkers.cpp.

Member Function Documentation

◆ DeepCopy() [1/2]

rigidbody::KalmanReconsMarkers 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 rigidbody::KalmanReconsMarkers::DeepCopy ( const KalmanReconsMarkers & other)

Deep copy of the Kalman reconstruction.

Parameters
otherThe Kalman reconstruction to copy

Definition at line 42 of file KalmanReconsMarkers.cpp.

◆ first()

bool 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.

◆ initialize()

void rigidbody::KalmanReconsMarkers::initialize ( )
protectedvirtual

Initialization of the filter.

Reimplemented from BIORBD_NAMESPACE::rigidbody::KalmanRecons.

Definition at line 49 of file KalmanReconsMarkers.cpp.

◆ manageOcclusionDuringIteration()

void rigidbody::KalmanReconsMarkers::manageOcclusionDuringIteration ( utils::Matrix & InvTp,
utils::Vector & measure,
const std::vector< size_t > & 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_NAMESPACE::rigidbody::KalmanRecons.

Definition at line 56 of file KalmanReconsMarkers.cpp.

◆ reconstructFrame() [1/4]

void rigidbody::KalmanReconsMarkers::reconstructFrame ( )
virtual

This function cannot be used to reconstruct frames.

Implements BIORBD_NAMESPACE::rigidbody::KalmanRecons.

Definition at line 192 of file KalmanReconsMarkers.cpp.

◆ reconstructFrame() [2/4]

void rigidbody::KalmanReconsMarkers::reconstructFrame ( Model & model,
const Markers & Tobs,
rigidbody::GeneralizedCoordinates * Q,
rigidbody::GeneralizedVelocity * Qdot,
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 70 of file KalmanReconsMarkers.cpp.

◆ reconstructFrame() [3/4]

void rigidbody::KalmanReconsMarkers::reconstructFrame ( Model & model,
const std::vector< NodeSegment > & Tobs,
rigidbody::GeneralizedCoordinates * Q,
rigidbody::GeneralizedVelocity * Qdot,
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 87 of file KalmanReconsMarkers.cpp.

◆ reconstructFrame() [4/4]

void rigidbody::KalmanReconsMarkers::reconstructFrame ( Model & model,
const utils::Vector & Tobs,
rigidbody::GeneralizedCoordinates * Q = nullptr,
rigidbody::GeneralizedVelocity * Qdot = nullptr,
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 104 of file KalmanReconsMarkers.cpp.

Member Data Documentation

◆ m_firstIteration

std::shared_ptr<bool> BIORBD_NAMESPACE::rigidbody::KalmanReconsMarkers::m_firstIteration
protected

If first iteration was done.

Definition at line 130 of file KalmanReconsMarkers.h.

◆ m_PpInitial

std::shared_ptr<utils::Matrix> BIORBD_NAMESPACE::rigidbody::KalmanReconsMarkers::m_PpInitial
protected

Initial covariance matrix.

Definition at line 129 of file KalmanReconsMarkers.h.


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