31 float maxPositionAcceleration,
float maxOrientationAcceleration,
float maxNullspaceAcceleration,
const VirtualRobot::RobotNodePtr& tcp)
34 setMaxAccelerations(maxPositionAcceleration, maxOrientationAcceleration, maxNullspaceAcceleration);
35 #pragma GCC diagnostic push
36 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
38 #pragma GCC diagnostic pop
47 Eigen::FullPivLU<Eigen::MatrixXf> lu_decomp(jacobi);
48 Eigen::MatrixXf nullspace = lu_decomp.kernel();
49 Eigen::VectorXf nsv = Eigen::VectorXf::Zero(nullspace.rows());
51 for (
int i = 0; i < nullspace.cols(); i++)
53 nsv += nullspace.col(i) * nullspace.col(i).dot(currentJointVelocity) / nullspace.col(i).squaredNorm();
55 cartesianVelocityRamp.
setState(jacobi * currentJointVelocity, mode);
63 cartesianVelocityRamp.
setState(jacobi * currentJointVelocity, mode);
74 Eigen::VectorXf nullspaceVel =
controller.calculateNullspaceVelocity(cartesianVel, jointLimitAvoidanceScale, mode);
81 return controller.calculate(cartesianVelocityRamp.
update(cartesianVel,
dt), nullSpaceVelocityRamp.
update(nullspaceVel,
dt), mode);