3 #include <SimoxUtility/math/convert/mat4f_to_quat.h>
4 #include <VirtualRobot/MathTools.h>
17 const VirtualRobot::RobotNodeSetPtr& rns,
18 const VirtualRobot::RobotNodeSetPtr& rtRns)
24 rtTCP = rtRns->getTCP();
26 ik.reset(
new VirtualRobot::DifferentialIK(
27 rtRns, rtRns->getRobot()->getRootNode(), VirtualRobot::JacobiProvider::eSVDDamped));
34 const VirtualRobot::RobotNodeSetPtr& rns)
104 c.desiredPose.block<3, 3>(0, 0) * rtStatus.
currentPose.block<3, 3>(0, 0).transpose();
115 else if ((
c.desiredPose.block<3, 1>(0, 3) - rtStatus.
currentPose.block<3, 1>(0, 3)).norm() >
116 c.safeDistanceMMToGoal or
119 VirtualRobot::MathTools::deg2rad(
c.safeRotAngleDegreeToGoal))
134 ik->getJacobianMatrix(
rtTCP, VirtualRobot::IKSolver::CartesianSelection::All);
139 rtStatus.
jpinv = ik->computePseudoInverseJacobianMatrix(
140 rtStatus.
jacobi, ik->getJacobiRegularization(VirtualRobot::IKSolver::CartesianSelection::All));
186 c.kpNullspaceVel.cwiseProduct(
c.desiredNullspaceJointAngles.value() -
242 jpinv.setZero(nDoF, 6);
253 currentPose = currentTCPPose;
254 desiredPose = currentTCPPose;