26 #include <boost/foreach.hpp>
29 #include <MemoryX/interface/components/LongtermMemoryInterface.h>
35 std::string handNodeName,
36 LongtermMemoryInterfacePrx longtermMemory) :
40 robotStateProxy->getRobotSnapshot(
"MotionModelBodySchemaPrediction");
41 armarx::SharedRobotNodeInterfacePrx handNode =
48 std::string parentName = handNode->getParent();
50 while (!parentName.empty())
52 armarx::SharedRobotNodeInterfacePrx node =
53 currentRobotSnapshot->getRobotNode(parentName);
55 if (node->getType() == armarx::eRevolute)
60 parentName = node->getParent();
77 poseAtLastLocalization->referenceRobot->getRobotNode(
handNodeName)->getGlobalPose());
79 poseAtLastLocalization->referenceRobot->getRobotNode(poseAtLastLocalization->frame)
83 robotStateProxy->getRobotSnapshot(
"MotionModelBodySchemaPrediction");
87 unsigned int index = 0;
90 proprioception(
index) = currentRobotSnapshot->getRobotNode(nodeName)->getJointValue();
94 Eigen::VectorXf predictionXf = this->
model->predict(proprioception);
98 prediction, currentRobotSnapshot->getRootNode()->getName(), currentRobotSnapshot);
104 const armarx::LinkedPoseBasePtr& poseAtLastLocalization,
105 const armarx::PoseBasePtr& globalRobotPoseAtLastLocalization,
106 const Ice::Current&
c)
111 this->poseAtLastLocalization = poseAtLastLocalization;
112 this->globalRobotPoseAtLastLocalization = globalRobotPoseAtLastLocalization;
115 armarx::LinkedPosePtr::dynamicCast(this->poseAtLastLocalization)->toEigen();
120 armarx::SharedRobotNodeInterfacePrx handNode =
121 poseAtLastLocalization->referenceRobot->getRobotNode(
handNodeName);
125 unsigned int index = 0;
128 proprioception(
index) =
129 poseAtLastLocalization->referenceRobot->getRobotNode(nodeName)->getJointValue();
133 this->
model->online(proprioception, shape);
136 memoryx::MultivariateNormalDistributionBasePtr
139 if (uncertaintyAtLastLocalization)
141 return uncertaintyAtLastLocalization;