Template Function pinocchio::getFrameAcceleration(const ModelTpl<Scalar, Options, JointCollectionTpl>&, const DataTpl<Scalar, Options, JointCollectionTpl>&, const FrameIndex, const ReferenceFrame)

Function Documentation

template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl>
inline MotionTpl<Scalar, Options> pinocchio::getFrameAcceleration(const ModelTpl<Scalar, Options, JointCollectionTpl> &model, const DataTpl<Scalar, Options, JointCollectionTpl> &data, const FrameIndex frame_id, const ReferenceFrame rf = LOCAL)

Returns the spatial acceleration of the Frame expressed in the desired reference frame. You must first call pinocchio::forwardKinematics to update placement, velocity and acceleration values in the data structure.

Remark

In the context of a frame placement constraint J(q)a+J˙(q,v)v=0, one way to compute the second term J˙(q,v)v is to call second-order forwardKinematics with a zero acceleration, then read the remaining J˙(q,v)v by calling this function. This is significantly more efficient than applying the matrix J˙(q,v) (from getFrameJacobianTimeVariation) to the velocity vector v.

Warning

Second order forwardKinematics should have been called first

Parameters:
  • model[in] The kinematic model

  • data[in] Data associated to model

  • frame_id[in] Id of the operational Frame

  • rf[in] Reference frame in which the acceleration is expressed.

Returns:

The spatial acceleration of the Frame expressed in the desired reference frame.