Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
momentum::ModelParametersErrorFunctionT< T > Class Template Reference

#include <model_parameters_error_function.h>

Inheritance diagram for momentum::ModelParametersErrorFunctionT< T >:

Public Member Functions

 ModelParametersErrorFunctionT (const Skeleton &skel, const ParameterTransform &pt)
 ModelParametersErrorFunctionT (const Character &character)
 ModelParametersErrorFunctionT (const Character &character, const ParameterSet &active)
double getError (const ModelParametersT< T > &parameters, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState) final
double getGradient (const ModelParametersT< T > &parameters, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, Ref< Eigen::VectorX< T > > gradient) final
double getJacobian (const ModelParametersT< T > &parameters, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, Ref< Eigen::MatrixX< T > > jacobian, Ref< Eigen::VectorX< T > > residual, int &usedRows) final
size_t getJacobianSize () const final
void setTargetParameters (const ModelParametersT< T > &params, const Eigen::VectorX< T > &weights)
const ModelParametersT< T > & getTargetParameters () const
const Eigen::VectorX< T > & getTargetWeights () const
Public Member Functions inherited from momentum::SkeletonErrorFunctionT< T >
 SkeletonErrorFunctionT (const Skeleton &skel, const ParameterTransform &pt)
virtual ~SkeletonErrorFunctionT ()=default
const Skeleton & getSkeleton () const
const ParameterTransform & getParameterTransform () const
virtual const Character * getCharacter () const
 For mesh-based error functions, get access to the underlying character.
void setWeight (T w)
T getWeight () const
void setActiveJoints (const VectorX< bool > &aj)
void setEnabledParameters (const ParameterSet &ps)
virtual double getGradient (const ModelParametersT< T > &, const SkeletonStateT< T > &, const MeshStateT< T > &, Eigen::Ref< Eigen::VectorX< T > >)
virtual double getJacobian (const ModelParametersT< T > &, const SkeletonStateT< T > &, const MeshStateT< T > &, Eigen::Ref< Eigen::MatrixX< T > >, Eigen::Ref< Eigen::VectorX< T > >, int &usedRows)
virtual void getHessian (const ModelParametersT< T > &, const SkeletonStateT< T > &, const MeshStateT< T > &, Eigen::Ref< Eigen::MatrixX< T > >)
virtual double getSolverDerivatives (const ModelParametersT< T > &parameters, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, const size_t actualParameters, Eigen::MatrixX< T > &hess, Eigen::VectorX< T > &grad)
virtual bool needsMesh () const

Static Public Attributes

static constexpr T kMotionWeight = 1e-1

Additional Inherited Members

Protected Attributes inherited from momentum::SkeletonErrorFunctionT< T >
const Skeleton & skeleton_
const ParameterTransform & parameterTransform_
T weight_
VectorX< bool > activeJointParams_
ParameterSet enabledParameters_
bool useHessian_ {false}

Detailed Description

template<typename T>
class momentum::ModelParametersErrorFunctionT< T >

Definition at line 17 of file model_parameters_error_function.h.

Constructor & Destructor Documentation

◆ ModelParametersErrorFunctionT() [1/3]

◆ ModelParametersErrorFunctionT() [2/3]

template<typename T>
momentum::ModelParametersErrorFunctionT< T >::ModelParametersErrorFunctionT ( const Character & character)
explicit

◆ ModelParametersErrorFunctionT() [3/3]

template<typename T>
momentum::ModelParametersErrorFunctionT< T >::ModelParametersErrorFunctionT ( const Character & character,
const ParameterSet & active )

Member Function Documentation

◆ getError()

template<typename T>
double momentum::ModelParametersErrorFunctionT< T >::getError ( const ModelParametersT< T > & parameters,
const SkeletonStateT< T > & state,
const MeshStateT< T > & meshState )
nodiscardfinalvirtual

◆ getGradient()

template<typename T>
double momentum::ModelParametersErrorFunctionT< T >::getGradient ( const ModelParametersT< T > & parameters,
const SkeletonStateT< T > & state,
const MeshStateT< T > & meshState,
Ref< Eigen::VectorX< T > > gradient )
final

◆ getJacobian()

template<typename T>
double momentum::ModelParametersErrorFunctionT< T >::getJacobian ( const ModelParametersT< T > & parameters,
const SkeletonStateT< T > & state,
const MeshStateT< T > & meshState,
Ref< Eigen::MatrixX< T > > jacobian,
Ref< Eigen::VectorX< T > > residual,
int & usedRows )
final

◆ getJacobianSize()

template<typename T>
size_t momentum::ModelParametersErrorFunctionT< T >::getJacobianSize ( ) const
nodiscardfinalvirtual

Reimplemented from momentum::SkeletonErrorFunctionT< T >.

Definition at line 90 of file model_parameters_error_function.cpp.

◆ getTargetParameters()

◆ getTargetWeights()

◆ setTargetParameters()

template<typename T>
void momentum::ModelParametersErrorFunctionT< T >::setTargetParameters ( const ModelParametersT< T > & params,
const Eigen::VectorX< T > & weights )
inline

Member Data Documentation

◆ kMotionWeight


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