Go to the documentation of this file.
28 using namespace FindAndGraspObjectGroup;
43 float timeoutLiftObject = getInput<float>(
"timeoutLiftObject");
49 context->
remoteRobot->getRobotNode(getInput<std::string>(
"tcpName"))->getGlobalPose(),
52 liftedHandPose(2, 3) += 150;
53 FramedPosition targetPosition(liftedHandPose, currentHandPose.frame);
56 setLocal(
"targetTCPPosition", targetPosition);
57 setLocal(
"targetTCPOrientation", targetOrientation);
58 setLocal(
"targetPositionDistanceTolerance", 40.0f);
59 setLocal(
"targetOrientationDistanceTolerance", 3.15f);
60 setLocal(
"ikWithOrientation",
false);
62 setLocal(
"timeoutInMs",
int(timeoutLiftObject));
63 setLocal(
"jointTargetTolerance", 0.01f);
64 setLocal(
"kinematicChainName", getInput<std::string>(
"kinematicChain"));
74 std::string kinChainName = getInput<std::string>(
"kinematicChain");
91 if (!robot->hasRobotNodeSet(kinChainName))
93 ARMARX_WARNING <<
"Robot does not know kinematic chain with name " << kinChainName <<
flush;
97 VirtualRobot::RobotNodeSetPtr rns = robot->getRobotNodeSet(kinChainName);
102 for (
unsigned int i = 0; i < rns->getSize(); i++)
104 targetJointVelocities[rns->getNode(i)->getName()] = 0;
void onExit() override
Virtual function, in which the behaviour of state is defined, when it is exited. Can be overridden,...
MatrixXX< 4, 4, float > Matrix4f
ActionEventIdentifier condLiftObjectTimeout
VirtualRobot::RobotPtr remoteRobot
void setLocal(std::string const &key, const Variant &value)
setLocal() sets a local parameter.
IceInternal::Handle< XMLStateFactoryBase > XMLStateFactoryBasePtr
static std::string GetName()
static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData)
ActionEventIdentifier setTimeoutEvent(int timeoutDurationMs, const EventPtr &evt)
Utility function to start a timer on the systemObserver and register an event on the conditionHandler...
Class for legacy to stay compatible with old statecharts.
const LogSender::manipulator flush
The FramedPosition class.
virtual Eigen::Matrix4f toEigen() const
static SubClassRegistry Registry
The FramedOrientation class.
void onEnter() override
Virtual function, in which the behaviour of state is defined, when it is entered. Can be overridden,...
LiftObject(XMLStateConstructorParams stateData)
VirtualRobot::RobotPtr createLocalClone()
Clones the structure of this remote robot to a local instance.
RobotStateComponentInterfacePrx robotStateComponent
Prx for the RobotState.
void removeTimeoutEvent(const ActionEventIdentifier &id)
KinematicUnitInterfacePrx kinematicUnitPrx
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::shared_ptr< class Robot > RobotPtr