30#include <Eigen/Geometry>
32#include <VirtualRobot/EndEffector/EndEffector.h>
33#include <VirtualRobot/RobotConfig.h>
69 std::string myShapeName = shapeName;
79 if (!
eef->hasPreshape(myShapeName))
81 ARMARX_INFO <<
"Shape with name " << myShapeName <<
" not known in eef "
82 <<
eef->getName() <<
". Looking for partial match";
84 bool foundMatch =
false;
86 for (std::string name :
eef->getPreshapes())
88 if (name.find(myShapeName) != std::string::npos)
99 ARMARX_WARNING <<
"No match found for " << myShapeName <<
" in eef "
100 <<
eef->getName() <<
" available shapes: " <<
eef->getPreshapes();
105 VirtualRobot::RobotConfigPtr config =
eef->getPreshape(myShapeName);
106 std::map<std::string, float> jointAngles = config->getRobotNodeJointValueMap();
108 NameControlModeMap controlModes;
110 for (std::pair<std::string, float> pair : jointAngles)
112 controlModes.insert(std::make_pair(pair.first, ePositionControl));
122 NameControlModeMap controlModes;
124 for (std::pair<std::string, float> pair : jointAngles)
126 controlModes.insert(std::make_pair(pair.first, ePositionControl));
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Property< PropertyType > getProperty(const std::string &name)
Defines all necessary properties for armarx::HandUnitSimulation.
void setJointAngles(const NameValueMap &jointAngles, const Ice::Current &c=Ice::emptyCurrent) override
void onInitHandUnit() override
void onExitHandUnit() override
void setShape(const std::string &shapeName, const Ice::Current &c=Ice::emptyCurrent) override
Send command to the hand to form a specific shape position.
KinematicUnitInterfacePrx kinematicUnitPrx
void onStartHandUnit() override
PropertyDefinitionsPtr createPropertyDefinitions() override
VirtualRobot::EndEffectorPtr eef
std::string kinematicUnitName
bool usingProxy(const std::string &name, const std::string &endpoints="")
Registers a proxy for retrieval after initialization and adds it to the dependency list.
Ice::ObjectPrx getProxy(long timeoutMs=0, bool waitForScheduler=true) const
Returns the proxy of this object (optionally it waits for the proxy)
#define ARMARX_INFO
The normal logging level.
#define ARMARX_ERROR
The logging level for unexpected behaviour, that must be fixed.
#define ARMARX_WARNING
The logging level for unexpected behaviour, but not a serious problem.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.