27 NJointControllerRegistration<NJointKeypointsAdmittanceMPController>
29 "NJointKeypointsAdmittanceMPController");
33 const NJointControllerConfigPtr& config,
37 createMPs(configFileName);
43 return "NJointKeypointsAdmittanceMPController";
60 if (mp.second.mp->getClassName() ==
"KeypointsMP")
63 std::dynamic_pointer_cast<mp::KeypointsMPInput>(mp.second.input);
73 if (mp.second.mp->getClassName() ==
"KeypointsMP" and !mp.second.mp->isFinished())
76 std::dynamic_pointer_cast<mp::KeypointsMPOutput>(mp.second.output);
88 ARMARX_IMPORTANT <<
"rt pre activate: reinitialize the mp input output, as well as the rt "
89 "related buffer values";
93 if (mp.second.mp->getClassName() ==
"KeypointsMP")
95 ARMARX_IMPORTANT <<
"initialize input output buffers between KeypointsMP and "
96 "keypoint controllers";
98 auto in = std::dynamic_pointer_cast<mp::KeypointsMPInput>(mp.second.input);
99 in->keypointPosition =
controller.s.filteredKeypointPosition;
100 in->keypointVelocity =
controller.s.currentKeypointVelocity;
102 auto out = std::dynamic_pointer_cast<mp::KeypointsMPOutput>(mp.second.output);
103 out->keypointPosition =
controller.s.filteredKeypointPosition;
104 out->keypointVelocity =
controller.s.currentKeypointVelocity;