26#include <VirtualRobot/RobotNodeSet.h>
36CartesianPositionControl::SubClassRegistry
50 int timeout = in.getTimeout();
54 setTimeoutEvent(timeout, createEventTimeout());
58 if (isInputParameterSet(
"TcpTargetPosition") && isInputParameterSet(
"TcpTargetOrientation"))
60 if (in.getTcpTargetPosition()->frame != in.getTcpTargetOrientation()->frame)
62 ARMARX_WARNING <<
"Frame mismatch between target position and target orientation"
69 if (!isInputParameterSet(
"TcpTargetPosition") && !isInputParameterSet(
"TcpTargetOrientation"))
84 if (in.isTcpTargetPositionSet())
87 getContext<MotionControlGroupStatechartContext>();
89 auto robot = context->
getRobot()->clone();
90 Eigen::Vector3f target = in.getTcpTargetPosition()->toRootEigen(robot);
91 Eigen::Vector3f currentTcpPosition = robot->getRobotNodeSet(in.getKinematicChainName())
93 ->getPoseInRootFrame()
97 <<
", current TCP position: " << currentTcpPosition
98 <<
", target: " << target <<
"(in root frame)";
CartesianPositionControl(XMLStateConstructorParams stateData)
static SubClassRegistry Registry
static XMLStateFactoryBasePtr CreateInstance(XMLStateConstructorParams stateData)
custom implementation of the StatechartContext for a statechart
const std::shared_ptr< RemoteRobot > getRobot()
Class for legacy to stay compatible with old statecharts.
#define ARMARX_IMPORTANT
The logging level for always important information, but expected behaviour (in contrast to ARMARX_WAR...
#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.
const LogSender::manipulator flush
IceInternal::Handle< XMLStateFactoryBase > XMLStateFactoryBasePtr
double norm(const Point &a)