29 using namespace MotionControlGroup;
48 std::string kinematicChain =
"";
50 if (in.isKinematicChainNameSet())
52 kinematicChain = in.getKinematicChainName();
57 Ice::StringSeq nodeNames;
59 if (kinematicChain.empty())
61 auto start = IceUtil::Time::now();
62 nodeNames = context->
getRobot()->getSharedRobot()->getRobotNodes();
63 ARMARX_INFO <<
"getting nodes took " << (IceUtil::Time::now() - start).toMilliSecondsDouble() <<
"ms";
67 VirtualRobot::RobotNodeSetPtr nodeSet = context->
getRobot()->getRobotNodeSet(kinematicChain);
69 for (
size_t i = 0; i < nodeSet->getSize(); ++i)
71 nodeNames.push_back(nodeSet->getNode(i)->getName());
75 ARMARX_INFO <<
"Stopping joints, kin chain:" << kinematicChain <<
", nodes:" << nodeNames;
82 NameControlModeMap modes;
84 for (
auto& name : nodeNames)
86 zeroJointVelocities[name] = 0.0f;
87 modes[name] = eVelocityControl;
90 auto start = IceUtil::Time::now();
94 ARMARX_INFO <<
"setting joint velos took " << (IceUtil::Time::now() - start).toMilliSecondsDouble() <<
"ms";
95 start = IceUtil::Time::now();
98 ARMARX_INFO <<
"getting robot config took " << (IceUtil::Time::now() - start).toMilliSecondsDouble() <<
"ms";
102 for (
auto& name : nodeNames)
104 auto it = jointMap.find(name);
106 if (it != jointMap.end())
108 jointPositions[name] = it->second;
109 modes[name] = ePositionControl;
113 ARMARX_INFO <<
"new joint angles: " << jointPositions;