3 #include <SimoxUtility/math/convert/mat4f_to_quat.h>
4 #include <VirtualRobot/IK/DifferentialIK.h>
5 #include <VirtualRobot/IK/IKSolver.h>
6 #include <VirtualRobot/MathTools.h>
7 #include <VirtualRobot/Nodes/RobotNode.h>
8 #include <VirtualRobot/Robot.h>
9 #include <VirtualRobot/RobotNodeSet.h>
20 const VirtualRobot::RobotNodeSetPtr& rtRns,
21 const std::vector<size_t>& torqueControlledIndex,
22 const std::vector<size_t>& velocityControlledIndex)
34 rtTCP = rtRns->getTCP();
36 ik.reset(
new VirtualRobot::DifferentialIK(
37 rtRns, rtRns->getRobot()->getRootNode(), VirtualRobot::JacobiProvider::eSVDDamped));
110 ik->getJacobianMatrix(
rtTCP, VirtualRobot::IKSolver::CartesianSelection::All);
116 rtStatus.
jpinv = ik->computePseudoInverseJacobianMatrix(rtStatus.
jacobi, lambda);
135 for (
size_t i = 0; i < 6; i++)
150 c.kdCartesianVel.head<3>().cwiseProduct(rtStatus.
currentTwist.head<3>());
156 c.kdCartesianVel.tail<3>().cwiseProduct(rtStatus.
currentTwist.tail<3>());