28 #include <Eigen/Geometry>
32 #include <VirtualRobot/EndEffector/EndEffector.h>
33 #include <VirtualRobot/RobotConfig.h>
63 std::string myShapeName = shapeName;
73 if (!eef->hasPreshape(myShapeName))
75 ARMARX_INFO <<
"Shape with name " << myShapeName <<
" not known in eef " << eef->getName() <<
". Looking for partial match";
77 bool foundMatch =
false;
79 for (std::string name : eef->getPreshapes())
81 if (name.find(myShapeName) != std::string::npos)
92 ARMARX_WARNING <<
"No match found for " << myShapeName <<
" in eef " << eef->getName() <<
" available shapes: " << eef->getPreshapes();
97 VirtualRobot::RobotConfigPtr config = eef->getPreshape(myShapeName);
98 std::map < std::string, float >
jointAngles = config->getRobotNodeJointValueMap();
100 NameControlModeMap controlModes;
102 for (std::pair<std::string, float> pair :
jointAngles)
104 controlModes.insert(std::make_pair(pair.first, ePositionControl));
107 kinematicUnitPrx->switchControlMode(controlModes);
113 NameControlModeMap controlModes;
115 for (std::pair<std::string, float> pair :
jointAngles)
117 controlModes.insert(std::make_pair(pair.first, ePositionControl));
120 kinematicUnitPrx->switchControlMode(controlModes);