3 #include <SimoxUtility/math/convert/mat4f_to_quat.h>
4 #include <VirtualRobot/MathTools.h>
17 const VirtualRobot::RobotNodeSetPtr& rtRns)
21 rtTCP = rtRns->getTCP();
23 ik.reset(
new VirtualRobot::DifferentialIK(
24 rtRns, rtRns->getRobot()->getRootNode(), VirtualRobot::JacobiProvider::eSVDDamped));
73 c.desiredPose.block<3, 3>(0, 0) * rtStatus.
currentPose.block<3, 3>(0, 0).transpose();
86 if ((
c.desiredPose.block<3, 1>(0, 3) - rtStatus.
currentPose.block<3, 1>(0, 3)).norm() >
87 c.safeDistanceMMToGoal or
90 VirtualRobot::MathTools::deg2rad(
c.safeRotAngleDegreeToGoal))
106 c.desiredTwist.setZero();
107 c.kmAdmittance.setZero();
112 ik->getJacobianMatrix(
rtTCP, VirtualRobot::IKSolver::CartesianSelection::All);
119 ik->computePseudoInverseJacobianMatrix(rtStatus.
jacobi.transpose(), lambda);
154 VirtualRobot::MathTools::rpy2eigen3f(
155 rtStatus.
pos(3), rtStatus.
pos(4), rtStatus.
pos(5)) *
164 rtStatus.
currentPose.block<3, 3>(0, 0).transpose();
178 c.kpNullspace.cwiseProduct(
c.desiredNullspaceJointAngles.value() - rtStatus.
jointPos) -
250 currentPose = currentTCPPose;
251 desiredPose = currentTCPPose;
252 virtualPose = currentTCPPose;