Template Function pinocchio::pv

Function Documentation

template<typename Scalar, int Options, template<typename, int> class JointCollectionTpl, typename ConfigVectorType, typename TangentVectorType1, typename TangentVectorType2, class ContactModelAllocator, class ContactDataAllocator>
inline const DataTpl<Scalar, Options, JointCollectionTpl>::TangentVectorType &pinocchio::pv(const ModelTpl<Scalar, Options, JointCollectionTpl> &model, DataTpl<Scalar, Options, JointCollectionTpl> &data, const Eigen::MatrixBase<ConfigVectorType> &q, const Eigen::MatrixBase<TangentVectorType1> &v, const Eigen::MatrixBase<TangentVectorType2> &tau, const std::vector<RigidConstraintModelTpl<Scalar, Options>, ContactModelAllocator> &contact_models, std::vector<RigidConstraintDataTpl<Scalar, Options>, ContactDataAllocator> &contact_datas, ProximalSettingsTpl<Scalar> &settings)

The Popov-Vereshchagin algorithm. It computes constrained forward dynamics, aka the joint accelerations and constraint forces given the current state, actuation and the constraints on the system. All the quantities are expressed in the LOCAL coordinate systems of the joint frames.

Note

This also overwrites data.f, possibly leaving it in an inconsistent state.

Template Parameters:
  • JointCollection – Collection of Joint types.

  • ConfigVectorType – Type of the joint configuration vector.

  • TangentVectorType1 – Type of the joint velocity vector.

  • TangentVectorType2 – Type of the joint torque vector.

  • Allocator – Allocator class for the std::vector.

Parameters:
  • model[in] The model structure of the rigid body system.

  • data[in] The data structure of the rigid body system.

  • q[in] The joint configuration vector (dim model.nq).

  • v[in] The joint velocity vector (dim model.nv).

  • tau[in] The joint torque vector (dim model.nv).

  • contact_models[in] Vector of contact models.

  • contact_datas[in] Vector of contact data.

  • settings[in] Proximal settings (mu, accuracy and maximal number of iterations).

Returns:

A reference to the joint acceleration stored in data.ddq. data.lambdaA[0] stores the constraint forces.