11 auto humanMapping = robot->getHumanMapping();
12 ARMARX_CHECK(humanMapping) <<
"Robot '" << robot->getName() <<
"' has no human mapping";
14 auto armDescription = (side ==
LEFT) ? humanMapping->leftArm : humanMapping->rightArm;
15 auto elbow = armDescription.segments.elbow.nodeName;
16 auto wrist = armDescription.segments.wrist.nodeName;
17 auto palm = armDescription.segments.palm.nodeName;
20 auto nodeSetArm = robot->getRobotNodeSet(armDescription.nodeSet);
21 auto actuatedJoints = nodeSetArm->getNodeNames();
22 actuatedJoints.resize(nodeSetArm->getRobotNodeIndex(wrist));
25 reducedRobot_ = std::make_unique<simox::control::simox::robot::Robot>(
26 robot, actuatedJoints, std::vector({wrist, palm}),
true);
28 ik_ = std::make_unique<simox::control::method::example::PointingIK>(
30 *reducedRobot_->getNode(wrist),
31 *reducedRobot_->getNode(elbow),
32 side ==
LEFT ? reducedRobot_->humanMapping()->leftArm
33 : reducedRobot_->humanMapping()->rightArm);
35 ik_->setPointingTarget(target.cast<
double>() / 1000);
37 trajData.assign(ik_->getNodeNames().size(), std::vector<double>());
38 appendTrajData(ik_->getJointValues());