iDynTree/ExternalWrenchesEstimation.h file

Namespaces

namespace iDynTree

Classes

struct iDynTree::UnknownWrenchContact
A contact whose wrench is unknown.
class iDynTree::LinkUnknownWrenchContacts
A set of UnknownWrenchContact for each link, representing all the contacts between the model and the external environment whose wrench is unkwnon.
struct iDynTree::estimateExternalWrenchesBuffers

Enums

enum UnknownWrenchContactType { FULL_WRENCH, PURE_FORCE, PURE_FORCE_WITH_KNOWN_DIRECTION, NO_UNKNOWNS }
Type of a UnknownWrenchContact.

Functions

auto estimateExternalWrenchesWithoutInternalFT(const Model& model, const Traversal& traversal, const LinkUnknownWrenchContacts& unknownWrenches, const JointPosDoubleArray& jointPos, const LinkVelArray& linkVel, const LinkAccArray& linkProperAcc, estimateExternalWrenchesBuffers& bufs, LinkContactWrenches& outputContactWrenches) -> bool
Estimate the external contact wrenches using the MultiBody Newton-Euler equations.
auto estimateExternalWrenches(const Model& model, const SubModelDecomposition& subModels, const SensorsList& sensors, const LinkUnknownWrenchContacts& unknownWrenches, const JointPosDoubleArray& jointPos, const LinkVelArray& linkVel, const LinkAccArray& linkProperAcc, const SensorsMeasurements& ftSensorsMeasurements, estimateExternalWrenchesBuffers& bufs, LinkContactWrenches& outputContactWrenches) -> bool
Estimate the external wrenches trasmitted by the contacts between the model and the external environment.
auto dynamicsEstimationForwardVelAccKinematics(const Model& model, const Traversal& traversal, const Vector3& base_classicalProperAcc, const Vector3& base_angularVel, const Vector3& base_angularAcc, const JointPosDoubleArray& jointPos, const JointDOFsDoubleArray& jointVel, const JointDOFsDoubleArray& jointAcc, LinkVelArray& linkVel, LinkAccArray& linkProperAcc) -> bool
Modified forward kinematics for torque/force estimation.
auto dynamicsEstimationForwardVelKinematics(const Model& model, const Traversal& traversal, const Vector3& base_angularVel, const JointPosDoubleArray& jointPos, const JointDOFsDoubleArray& jointVel, LinkVelArray& linkVel) -> bool
Modified forward kinematics for floating basedynamics estimation.
auto computeLinkNetWrenchesWithoutGravity(const Model& model, const LinkVelArray& linkVel, const LinkAccArray& linkProperAcc, LinkNetTotalWrenchesWithoutGravity& linkNetWrenchesWithoutGravity) -> bool
Compute the net internal and external wrenches (excluding gravity forces) acting on the links.
auto estimateLinkContactWrenchesFromLinkNetExternalWrenches(const Model& model, const LinkUnknownWrenchContacts& unknownWrenches, const LinkNetExternalWrenches& netExtWrenches, LinkContactWrenches& outputContactWrenches) -> bool
Compute the link contact wrenches from the net external wrenches.

Enum documentation

enum UnknownWrenchContactType

Type of a UnknownWrenchContact.

Enumerators
FULL_WRENCH

Contact for which the complete wrench is unknown.

PURE_FORCE

Contact assumed to be a pure force excerted on the contact point.

PURE_FORCE_WITH_KNOWN_DIRECTION

Contact assumed to be a pure force with a known direction excerted on the contact point.

NO_UNKNOWNS

The contact forces is assumed to be known.

Function documentation

bool estimateExternalWrenchesWithoutInternalFT(const Model& model, const Traversal& traversal, const LinkUnknownWrenchContacts& unknownWrenches, const JointPosDoubleArray& jointPos, const LinkVelArray& linkVel, const LinkAccArray& linkProperAcc, estimateExternalWrenchesBuffers& bufs, LinkContactWrenches& outputContactWrenches)

Estimate the external contact wrenches using the MultiBody Newton-Euler equations.

This function is used to estimate the external contacts forces without using any measurement of the internal FT sensors. It is tipically used to get data for calibrating the offset of the internal FT sensors.

bool estimateExternalWrenches(const Model& model, const SubModelDecomposition& subModels, const SensorsList& sensors, const LinkUnknownWrenchContacts& unknownWrenches, const JointPosDoubleArray& jointPos, const LinkVelArray& linkVel, const LinkAccArray& linkProperAcc, const SensorsMeasurements& ftSensorsMeasurements, estimateExternalWrenchesBuffers& bufs, LinkContactWrenches& outputContactWrenches)

Estimate the external wrenches trasmitted by the contacts between the model and the external environment.

Parameters
model in the considered model.
subModels in a decomposition of the model along the joint of the six axis F/T sensors.
sensors in a description of the sensors available in the model.
unknownWrenches in a description of the contacts for which the contact wrench is unknown.
jointPos
linkVel in a vector of link twists, expressed w.r.t to the link orientation and the link origin
linkProperAcc in a vector of link spatial (in the Featherstone sense) and proper accelerations, expressed w.r.t to the link orientation and the link origin
ftSensorsMeasurements in the measurements of the internal six axis F/T sensors.
bufs
outputContactWrenches out the estimated contact wrenches.
Returns true if all went well (the dimension of the inputs are consistent), false otherwise

This function exploits the measurements of internal FT sensors (whose structure is contained in the sensors parameters and which measurements are contained in the ftSensorsMeasurements parameters) to compute an estimation of the values of the unknown wrenches specified in the unknownWrenches parameter.

bool dynamicsEstimationForwardVelAccKinematics(const Model& model, const Traversal& traversal, const Vector3& base_classicalProperAcc, const Vector3& base_angularVel, const Vector3& base_angularAcc, const JointPosDoubleArray& jointPos, const JointDOFsDoubleArray& jointVel, const JointDOFsDoubleArray& jointAcc, LinkVelArray& linkVel, LinkAccArray& linkProperAcc)

Modified forward kinematics for torque/force estimation.

Parameters
model in the input model
traversal in the traversal used to propagate the velocity and the proper acceleration
base_classicalProperAcc in classical proper acceleration of the base origin
base_angularVel in angular velocity of the base link frame
base_angularAcc in angular acceleration of the base link frame
jointPos in joint positions
jointVel in joint velocities
jointAcc in joint accelerations
linkVel out vector of link twists, expressed in the link frame for both orientation and origin
linkProperAcc out vector of link proper spatial acceleration, expressed in the link frame for both orientation and origin
Returns true if all went well, false otherwise

This is a version of forward kinematics modified to fit the needs of joint torques/external wrenches estimation.

There are several difference with respect to the classical forward kinematics. The first one is that the only inputs necessary related to the base link are the base link classical proper acceleration, the base link angular velocity and the base link angular acceleration. This is because the dynamics of an articulated system does not depend on an offset in linear velocity, and hence the estimation of joint torques/external wrenches is not affected by the base link linear velocity. This will mean that the link velocitity computed by this algorithm are not the velocity of the links with respect to an inertial frame. Nevertherless they can still be used for estimation.

There are two main ways in which the base information is computed: one is exploiting the knoledge that a link is not moving with respect to an inertial frame: in this case the classical proper acceleration boils down to the inverted gravitational acceleration, while the angular velocity and angular accelerations are equal to zero. The other way is to exploit the measure of an accelerometer and of a gyroscope mounted on the base link of the traversal: the accelerometer will then measure directly the classical proper acceleration, while the gyroscope will measure the angular velocity. The angular acceleration can be computed by numerical derivation, or simply neglected if its effect on the estimation is minimal.

bool dynamicsEstimationForwardVelKinematics(const Model& model, const Traversal& traversal, const Vector3& base_angularVel, const JointPosDoubleArray& jointPos, const JointDOFsDoubleArray& jointVel, LinkVelArray& linkVel)

Modified forward kinematics for floating basedynamics estimation.

Parameters
model in the input model
traversal in the traversal used to propagate the velocity and the proper acceleration
base_angularVel in angular velocity of the base link frame
jointPos in joint positions
jointVel in joint velocities
linkVel out vector of link twists, expressed in the link frame for both orientation and origin
Returns true if all went well, false otherwise

This is a version of velocity forward kinematics modified to fit the needs of free floating dynamics estimation.

There are several difference with respect to the classical forward kinematics. The first one is that the only inputs necessary related to the base link is the base link angular velocity. This is because the dynamics of an articulated system does not depend on an offset in linear velocity. This will mean that the link velocities computed by this algorithm are not the velocity of the links with respect to an inertial frame. Nevertherless they can still be used for estimation.

There are two main ways in which the base information is computed: one is exploiting the knoledge that a link is not moving with respect to an inertial frame: in this case the angular velocity is equal to zero. The other way is to exploit the measure of a gyroscope mounted on the base link of the traversal: the gyroscope will measure the link angular velocity.

bool computeLinkNetWrenchesWithoutGravity(const Model& model, const LinkVelArray& linkVel, const LinkAccArray& linkProperAcc, LinkNetTotalWrenchesWithoutGravity& linkNetWrenchesWithoutGravity)

Compute the net internal and external wrenches (excluding gravity forces) acting on the links.

Parameters
model in the input model
linkVel in a vector of link twists, expressed w.r.t to the link orientation and the link origin
linkProperAcc in a vector of link spatial (in the Featherstone sense) and proper accelerations, expressed w.r.t to the link orientation and the link origin
linkNetWrenchesWithoutGravity in the vector of the sum of all the wrenches (both internal and external, excluding gravity) acting on link i, expressed (both orientation and point) with respect to the reference frame of link i

bool estimateLinkContactWrenchesFromLinkNetExternalWrenches(const Model& model, const LinkUnknownWrenchContacts& unknownWrenches, const LinkNetExternalWrenches& netExtWrenches, LinkContactWrenches& outputContactWrenches)

Compute the link contact wrenches from the net external wrenches.

If there are more than 6 unknows for link, the problem becomes ill-defined and the function just assign all the external wrench to the first contact.