28 using namespace PlatformGroup;
30 #include <VirtualRobot/MathTools.h>
46 rot = Eigen::AngleAxisf(0, Eigen::Vector3f::UnitX())
47 * Eigen::AngleAxisf(0, Eigen::Vector3f::UnitY())
48 * Eigen::AngleAxisf(currentTarget->z, Eigen::Vector3f::UnitZ());
51 DrawColor color {0, 0, 1, 0.3};
52 const Eigen::Vector3f eigPos
54 currentTarget->x, currentTarget->y, 0
58 Eigen::Vector3f dir {0, 1, 0};
61 context->
debugDrawer->setArrowVisu(
"Platform",
"PlatformTargetPose", pos,
63 armarx::DrawColor {0, 0, 1, 1},
66 context->
debugDrawer->setSphereVisu(
"Platform",
"PlatformTargetPoseAccuracy", pos, color, positionalAccuracy);
74 ChannelRefPtr counter = getInput<ChannelRef>(
"positionCounter");
75 int positionIndex = counter->getDataField(
"value")->getInt();
79 local.setAdjustedPositionalAccuracy(in.getpositionalAccuracy());
80 local.setAdjustedOrientationalAccuracy(in.getorientationalAccuracy());
84 if (positionIndex < points->getSize())
87 ARMARX_VERBOSE <<
"going to Platform Target:" << currentTarget->toEigen().transpose() <<
flush;
88 float positionalAccuracy = in.getpositionalAccuracy();
90 local.setAbsoluteTargetPosition(currentTarget);
93 if (positionIndex < points->getSize() - 1)
97 local.setStopOnWaypoints(
false);
98 ARMARX_INFO <<
"Accuracy increase position: " << in.getIntermediateWaypointPositionAccuracyFactor();
99 ARMARX_INFO <<
"Accuracy increase orientation: " << in.getIntermediateWaypointOrientationAccuracyFactor();
100 local.setAdjustedPositionalAccuracy(in.getpositionalAccuracy() * in.getIntermediateWaypointPositionAccuracyFactor());
101 local.setAdjustedOrientationalAccuracy(in.getorientationalAccuracy() * in.getIntermediateWaypointOrientationAccuracyFactor());
102 local.setVerifyTargetPose(
false);
107 local.setStopOnWaypoints(
true);
108 local.setVerifyTargetPose(
true);
116 Vector3Ptr currentTarget = points->getVariant(points->getSize() - 1)->get<
Vector3>();
117 local.setAbsoluteTargetPosition(currentTarget);
119 setTimeoutEvent(getInput<int>(
"waitAfterLast"), createEvent<EvEndpointReached>());
122 ARMARX_INFO <<
"Positional accuracy: " << local.getAdjustedPositionalAccuracy();
123 ARMARX_INFO <<
"Orientational accuracy: " << local.getAdjustedOrientationalAccuracy();
132 context->
debugDrawer->removeSphereVisu(
"Platform",
"PlatformTargetPoseAccuracy");
133 context->
debugDrawer->removeArrowVisu(
"Platform",
"PlatformTargetPose");