26 #include <MemoryX/interface/components/WorkingMemoryInterface.h>
60 std::string oldFrameName = pose->frame;
66 ret->changeFrame(oldFrameName);
76 ARMARX_DEBUG_S <<
"MotionModelStaticObject::getUncertaintyInternal()";
78 if (uncertaintyAtLastLocalization)
83 const float positionDistance = (oldRobotPose.block<3, 1>(0, 3) - newRobotPose.block<3, 1>(0, 3)).
norm();
84 const float positionChangeUncertaintyFactor = 0.1 * positionDistance;
85 float additionalUncertaintyFactor = positionChangeUncertaintyFactor;
86 ARMARX_DEBUG_S <<
"positionChangeUncertaintyFactor: " << positionChangeUncertaintyFactor;
89 IceUtil::Time timeAtLastLocalization = armarx::TimestampVariantPtr::dynamicCast(timeOfLastSuccessfulLocalization)->toTime();
90 IceUtil::Time timeSinceLastLocalization = IceUtil::Time::now() - timeAtLastLocalization;
91 const float timeUncertaintyFactor = 0.0005 *
abs(timeSinceLastLocalization.toMilliSeconds());
92 additionalUncertaintyFactor += timeUncertaintyFactor;
93 ARMARX_DEBUG_S <<
"timeUncertaintyFactor: " << timeUncertaintyFactor;
96 Eigen::Matrix3f oldUncertainty = MultivariateNormalDistributionPtr::dynamicCast(uncertaintyAtLastLocalization)->toEigenCovariance();
97 Eigen::Matrix3f newUncertainty = oldUncertainty + additionalUncertainty;
100 ARMARX_DEBUG_S <<
"additionalUncertainty: " << additionalUncertainty;
116 if (globalRobotPoseAtLastLocalization)
118 oldRobotPose = armarx::PosePtr::dynamicCast(globalRobotPoseAtLastLocalization)->toEigen();
119 newRobotPose = armarx::PosePtr::dynamicCast(robotStateProxy->getSynchronizedRobot()->getGlobalPose())->toEigen();