Go to the documentation of this file.
28 using namespace FindAndGraspObjectGroup;
43 float timeoutLiftObject = getInput<float>(
"timeoutLiftObject");
48 FramedPose currentHandPose(context->
remoteRobot->getRobotNode(getInput<std::string>(
"tcpName"))->getGlobalPose(), context->
remoteRobot->getRootNode()->getName());
50 liftedHandPose(2, 3) += 150;
51 FramedPosition targetPosition(liftedHandPose, currentHandPose.frame);
54 setLocal(
"targetTCPPosition", targetPosition);
55 setLocal(
"targetTCPOrientation", targetOrientation);
56 setLocal(
"targetPositionDistanceTolerance", 40.0f);
57 setLocal(
"targetOrientationDistanceTolerance", 3.15f);
58 setLocal(
"ikWithOrientation",
false);
60 setLocal(
"timeoutInMs",
int(timeoutLiftObject));
61 setLocal(
"jointTargetTolerance", 0.01f);
62 setLocal(
"kinematicChainName", getInput<std::string>(
"kinematicChain"));
71 std::string kinChainName = getInput<std::string>(
"kinematicChain");
88 if (!robot->hasRobotNodeSet(kinChainName))
90 ARMARX_WARNING <<
"Robot does not know kinematic chain with name " << kinChainName <<
flush;
94 VirtualRobot::RobotNodeSetPtr rns = robot->getRobotNodeSet(kinChainName);
99 for (
unsigned int i = 0; i < rns->getSize(); i++)
101 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,...
ActionEventIdentifier condLiftObjectTimeout
VirtualRobot::RobotPtr remoteRobot
void setLocal(std::string const &key, const Variant &value)
setLocal() sets a local parameter.
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)
IceInternal::Handle< XMLStateFactoryBase > XMLStateFactoryBasePtr
MatrixXX< 4, 4, float > Matrix4f
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