38 setNumberParameters(3);
53 if (dataFields.size() != 1)
55 printf(
"Size of dataFields: %d\n", (
int)dataFields.size());
56 throw InvalidConditionException(
"Wrong number of datafields for condition equals ");
66 return (
sqrt(((typedValue->x - param->x) * (typedValue->x - param->x)) +
67 ((typedValue->y - param->y) * (typedValue->y - param->y)) +
68 ((typedValue->z - param->x) * (typedValue->x - param->z))) < getParameter(1).getFloat());
75 Eigen::Matrix3f diffRot = typedValue->toEigen() * param->toEigen().transpose();
76 Eigen::AngleAxisf aa(diffRot);
77 return fabs(aa.angle()) < getParameter(1).getFloat();
85 return param->
getFrame() == typedValue->getFrame()
86 && (
sqrt(((typedValue->x - param->x) * (typedValue->x - param->x)) +
87 ((typedValue->y - param->y) * (typedValue->y - param->y)) +
88 ((typedValue->z - param->x) * (typedValue->x - param->z))) < getParameter(1).getFloat());
96 Eigen::Matrix3f diffRot = typedValue->toEigen() * param->toEigen().transpose();
97 Eigen::AngleAxisf aa(diffRot);
98 return fabs(aa.angle()) < getParameter(1).getFloat();
106 bool positionOk = (
sqrt(((typedValue->position->x - param->position->x) * (typedValue->position->x - param->position->x)) +
107 ((typedValue->position->y - param->position->y) * (typedValue->position->y - param->position->y)) +
108 ((typedValue->position->z - param->position->x) * (typedValue->position->x - param->position->z)))
109 < getParameter(1).getFloat());
112 Eigen::AngleAxisf aa(diffRot);
114 fabs(aa.angle()) < getParameter(2).getFloat();
115 return positionOk && orientationOk;