36#include <MemoryX/interface/components/PriorKnowledgeInterface.h>
37#include <MemoryX/interface/components/WorkingMemoryInterface.h>
50 "objectToGrasp",
"",
"the object for which the grasp should be planned");
71 return "GraspingManagerTest";
92 srand(IceUtil::Time::now().toMicroSeconds());
107 auto object =
wm->getObjectInstancesSegment()->getEntityByName(objectName);
135 object =
wm->getObjectInstancesSegment()->getEntityByName(objectName);
138 ARMARX_INFO <<
"object initialized, generating grasping trajectory";
139 auto result = gm->generateGraspingTrajectory(object->getId());
145 poseTraj->setVariant(
"posetrajectory",
new Variant(result.poseTrajectory));
146 ARMARX_INFO <<
"Pose Trajectory: " << poseTraj->asString(
true);
156 jointTraj->setVariant(
"jointtrajectory",
new Variant(result.poseTrajectory));
157 ARMARX_INFO <<
"Joint Trajectory: " << jointTraj->asString(
true);
184 memoryx::PriorKnowledgeInterfacePrx prior;
185 memoryx::WorkingMemoryInterfacePrx
wm;
186 GraspingManagerInterfacePrx gm;
Default component property definition container.
ComponentPropertyDefinitions(std::string prefix, bool hasObjectNameParameter=true)
Baseclass for all ArmarX ManagedIceObjects requiring properties.
std::string getConfigIdentifier()
Retrieve config identifier for this component as set in constructor.
Property< PropertyType > getProperty(const std::string &name)
GraspingManagerTestPropertyDefinitions(std::string prefix)
void onInitComponent() override
void onDisconnectComponent() override
armarx::PropertyDefinitionsPtr createPropertyDefinitions() override
void onConnectComponent() override
void onExitComponent() override
std::string getDefaultName() const override
The JSONObject class is used to represent and (de)serialize JSON objects.
The ManagedIceObject is the base class for all ArmarX objects.
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)
std::string prefix
Prefix of the properties such as namespace, domain, component name, etc.
PropertyDefinition< PropertyType > & defineOptionalProperty(const std::string &name, PropertyType defaultValue, const std::string &description="", PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
The Variant class is described here: Variants.
#define ARMARX_CHECK_EXPRESSION(expression)
This macro evaluates the expression and if it turns out to be false it will throw an ExpressionExcept...
#define ARMARX_INFO
The normal logging level.
This file offers overloads of toIce() and fromIce() functions for STL container types.
IceUtil::Handle< class PropertyDefinitionContainer > PropertyDefinitionsPtr
PropertyDefinitions smart pointer type.
IceInternal::Handle< JSONObject > JSONObjectPtr
::IceInternal::ProxyHandle<::IceProxy::armarx::RobotStateComponentInterface > RobotStateComponentInterfacePrx