BipedalLocomotion::ContactModels::ContactModel class

ContactModel is a generic implementation of a contact model.

It computes the contact wrench between the robot and the environments.

Derived classes

class ContinuousContactModel final
ContinuousContactModel is a model that describe the contact using a continuous representation.

Public functions

auto initialize(std::weak_ptr<ParametersHandler::IParametersHandler> handler) -> bool
Initialization of the class.
auto getContactWrench() -> const iDynTree::Wrench&
Get and compute (only if it is necessary) the contact wrench.
auto getAutonomousDynamics() -> const iDynTree::Vector6&
Get and compute (only if it is necessary) the autonomous system dynamics.
auto getControlMatrix() -> const iDynTree::Matrix6x6&
Get and compute (only if it is necessary) the control matrix.
auto getRegressor() -> const iDynTree::MatrixDynSize&
Get and compute (only if it is necessary) the regressor.
void setState(const iDynTree::Twist& twist, const iDynTree::Transform& transform)
Set the internal state of the model.
void setNullForceTransform(const iDynTree::Transform& transform)

Protected functions

void computeContactWrench() pure virtual
Evaluate the contact wrench given a specific contact model.
void computeAutonomousDynamics() pure virtual
Evaluate the Autonomous System Dynamics of the derivative of a specific contact model.
void computeControlMatrix() pure virtual
Evaluate the Control Matrix of the derivative of a specific contact model.
void computeRegressor() pure virtual
Evaluate the regressor matrix.
auto initializePrivate(std::weak_ptr<ParametersHandler::IParametersHandler> handler) -> bool pure virtual
Initialization of the class.
void setStatePrivate(const iDynTree::Twist& twist, const iDynTree::Transform& transform) pure virtual
Set the internal state of the model.
void setNullForceTransformPrivate(const iDynTree::Transform& transform) pure virtual
Set the null force transform.

Protected variables

iDynTree::Wrench m_contactWrench
Contact wrench between the robot and the environment expressed in mixed representation.
iDynTree::Vector6 m_autonomousDynamics
Autonomous dynamics of the contact model rate of change (i.e.
iDynTree::Matrix6x6 m_controlMatrix
Control matrix of the contact model rate of change (i.e.
iDynTree::MatrixDynSize m_regressor
Contains the regressor of the contact model.

Function documentation

bool BipedalLocomotion::ContactModels::ContactModel::initialize(std::weak_ptr<ParametersHandler::IParametersHandler> handler)

Initialization of the class.

Parameters
handler std::weak_ptr to a parameter container. This class does not have the ownership of the container.
Returns true/false in case of success/failure

Please call this method before evaluating any other function

const iDynTree::Wrench& BipedalLocomotion::ContactModels::ContactModel::getContactWrench()

Get and compute (only if it is necessary) the contact wrench.

Returns the contact wrench expressed in mixed representation

const iDynTree::Vector6& BipedalLocomotion::ContactModels::ContactModel::getAutonomousDynamics()

Get and compute (only if it is necessary) the autonomous system dynamics.

Returns the autonomous system dynamics at a given state

const iDynTree::Matrix6x6& BipedalLocomotion::ContactModels::ContactModel::getControlMatrix()

Get and compute (only if it is necessary) the control matrix.

Returns the control matrix at a given state

const iDynTree::MatrixDynSize& BipedalLocomotion::ContactModels::ContactModel::getRegressor()

Get and compute (only if it is necessary) the regressor.

Returns the regressor at a given state

void BipedalLocomotion::ContactModels::ContactModel::setState(const iDynTree::Twist& twist, const iDynTree::Transform& transform)

Set the internal state of the model.

bool BipedalLocomotion::ContactModels::ContactModel::initializePrivate(std::weak_ptr<ParametersHandler::IParametersHandler> handler) pure virtual protected

Initialization of the class.

Parameters
handler std::weak_ptr to a parameter container. This class does not have the ownership of the container.
Returns true/false in case of success/failure

Variable documentation

iDynTree::Vector6 BipedalLocomotion::ContactModels::ContactModel::m_autonomousDynamics protected

Autonomous dynamics of the contact model rate of change (i.e.

given a non linear system $\dot{x} = f + g u$ the autonomous dynamics is f

iDynTree::Matrix6x6 BipedalLocomotion::ContactModels::ContactModel::m_controlMatrix protected

Control matrix of the contact model rate of change (i.e.

given a non linear system $\dot{x} = f + g u$ the control matrix is g

iDynTree::MatrixDynSize BipedalLocomotion::ContactModels::ContactModel::m_regressor protected

Contains the regressor of the contact model.

$f = A \theta$ , where $f$ is the contact wrench, $A$ the regressor and $\theta$ the parameters