iDynTree::GravityCompensationHelper class

Class computing the gravity compensation torques using accelerometer measurements.

Constructors, destructors, conversion operators

GravityCompensationHelper()
Default Constructor.
~GravityCompensationHelper()
Destructor.

Public functions

auto loadModel(const iDynTree::Model& _model, const std::string dynamicBase) -> bool
Load model.
auto updateKinematicsFromProperAcceleration(const iDynTree::JointPosDoubleArray& jointPos, const iDynTree::FrameIndex& floatingFrame, const iDynTree::Vector3& properClassicalLinearAcceleration) -> bool
Set the kinematic information necessary for the gravity torques estimation using the proper acceleration coming from an accelerometer.
auto updateKinematicsFromGravity(const iDynTree::JointPosDoubleArray& jointPos, const iDynTree::FrameIndex& floatingFrame, const iDynTree::Vector3& gravity) -> bool
Set the kinematic information necessary for the gravity torques estimation using the assumed known gravity vector on frame.
auto getGravityCompensationTorques(iDynTree::JointDOFsDoubleArray& jointTrqs) -> bool
Get the gravity compensation torques.

Function documentation

bool iDynTree::GravityCompensationHelper::loadModel(const iDynTree::Model& _model, const std::string dynamicBase)

Load model.

Returns true if successful, false otherwise

bool iDynTree::GravityCompensationHelper::updateKinematicsFromProperAcceleration(const iDynTree::JointPosDoubleArray& jointPos, const iDynTree::FrameIndex& floatingFrame, const iDynTree::Vector3& properClassicalLinearAcceleration)

Set the kinematic information necessary for the gravity torques estimation using the proper acceleration coming from an accelerometer.

Parameters
jointPos in the position of the joints in the model
floatingFrame in the frame index for which proper acceleration is provided
properClassicalLinearAcceleration in proper (actual acceleration - gravity) classical acceleration of the origin of the specified frame, expresssed in the specified frame orientation
Returns true if successful, false otherwise

bool iDynTree::GravityCompensationHelper::updateKinematicsFromGravity(const iDynTree::JointPosDoubleArray& jointPos, const iDynTree::FrameIndex& floatingFrame, const iDynTree::Vector3& gravity)

Set the kinematic information necessary for the gravity torques estimation using the assumed known gravity vector on frame.

Parameters
jointPos in the position of the joints in the model
floatingFrame in the frame index for which gravity vector is provided
gravity
Returns true if successful, false otherwise

bool iDynTree::GravityCompensationHelper::getGravityCompensationTorques(iDynTree::JointDOFsDoubleArray& jointTrqs)

Get the gravity compensation torques.

Returns true if successful, false otherwise