Function pfield::dampedLeastSquares

Function Documentation

inline Eigen::VectorXd pfield::dampedLeastSquares(const Eigen::MatrixXd &J, const Eigen::VectorXd &V, const double lambda = 1e-3)

Given a Jacobian Matrix J and a 6D twist V, compute the damped least squares solution for the joint velocities.

Parameters:
  • J – The Jacobian matrix, size (6 x n)

  • V – The 6D twist vector

  • lambda – The damping factor for the least squares solution

Returns:

Eigen::VectorXd The computed joint velocities