51 Eigen::Matrix4f liftedHandPose = currentHandPose.
toEigen();
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);
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);
100 NameValueMap targetJointVelocities;
102 for (
unsigned int i = 0; i < rns->getSize(); i++)
104 targetJointVelocities[rns->getNode(i)->getName()] = 0;
VirtualRobot::RobotPtr remoteRobot
ActionEventIdentifier condLiftObjectTimeout
static SubClassRegistry Registry
void onEnter() override
Virtual function, in which the behaviour of state is defined, when it is entered. Can be overridden,...
static std::string GetName()
void onExit() override
Virtual function, in which the behaviour of state is defined, when it is exited. Can be overridden,...
LiftObject(XMLStateConstructorParams stateData)
static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData)
The FramedOrientation class.
The FramedPosition class.
virtual Eigen::Matrix4f toEigen() const
VirtualRobot::RobotPtr createLocalClone()
Clones the structure of this remote robot to a local instance.
RobotStateComponentInterfacePrx robotStateComponent
Prx for the RobotState.
KinematicUnitInterfacePrx kinematicUnitPrx
ContextType * getContext() const
void removeTimeoutEvent(const ActionEventIdentifier &id)
ActionEventIdentifier setTimeoutEvent(int timeoutDurationMs, const EventPtr &evt)
Utility function to start a timer on the systemObserver and register an event on the conditionHandler...
EventPtr createEvent()
Utility function to create a new Event.
void sendEvent(const EventPtr event, StateBasePtr eventProcessor=nullptr)
Function to send an event to a specific state from an onEnter()-function. Must not be called anywhere...
std::enable_if_t< std::is_base_of_v< VariantDataClass, T >, IceInternal::Handle< T > > getInput(const std::string &key) const
getInput can be used to access a specific input parameter.
void setLocal(std::string const &key, const Variant &value)
setLocal() sets a local parameter.
XMLStateTemplate(const XMLStateConstructorParams ¶ms)
#define ARMARX_DEBUG
The logging level for output that is only interesting while debugging.
#define ARMARX_WARNING
The logging level for unexpected behaviour, but not a serious problem.
#define ARMARX_VERBOSE
The logging level for verbose information.
std::shared_ptr< class Robot > RobotPtr
This file offers overloads of toIce() and fromIce() functions for STL container types.
const LogSender::manipulator flush
IceInternal::Handle< XMLStateFactoryBase > XMLStateFactoryBasePtr