3 #include <SimoxUtility/math/convert/mat4f_to_quat.h>
4 #include <VirtualRobot/IK/DifferentialIK.h>
5 #include <VirtualRobot/IK/JacobiProvider.h>
6 #include <VirtualRobot/MathTools.h>
7 #include <VirtualRobot/Nodes/RobotNode.h>
8 #include <VirtualRobot/Robot.h>
9 #include <VirtualRobot/RobotNodeSet.h>
22 const VirtualRobot::RobotNodeSetPtr& rtRns)
28 rtTCP = rtRns->getTCP();
30 ik.reset(
new VirtualRobot::DifferentialIK(
31 rtRns, rtRns->getRobot()->getRootNode(), VirtualRobot::JacobiProvider::eSVDDamped));
107 c.desiredPose.block<3, 3>(0, 0) * rtStatus.
currentPose.block<3, 3>(0, 0).transpose();
118 else if ((
c.desiredPose.block<3, 1>(0, 3) - rtStatus.
currentPose.block<3, 1>(0, 3)).norm() >
119 c.safeDistanceMMToGoal or
122 VirtualRobot::MathTools::deg2rad(
c.safeRotAngleDegreeToGoal))
137 ik->getJacobianMatrix(
rtTCP, VirtualRobot::IKSolver::CartesianSelection::All);
142 rtStatus.
jpinv = ik->computePseudoInverseJacobianMatrix(
144 ik->getJacobiRegularization(VirtualRobot::IKSolver::CartesianSelection::All));
190 c.kpNullspaceVel.cwiseProduct(
c.desiredNullspaceJointAngles.value() -
247 jpinv.setZero(nDoF, 6);
257 currentPose = currentTCPPose;
258 desiredPose = currentTCPPose;
259 accumulateTime = 0.0;