31 const RobotUnitPtr& robotUnit,
32 const NJointControllerConfigPtr& config,
37 createMPs(configFileName);
42 return "NJointKeypointsAdmittanceMPController";
57 if (mp.second.mp->getClassName() ==
"KeypointsMP")
69 if (mp.second.mp->getClassName() ==
"KeypointsMP" and !mp.second.mp->isFinished())
82 ARMARX_IMPORTANT <<
"rt pre activate: reinitialize the mp input output, as well as the rt related buffer values";
86 if (mp.second.mp->getClassName() ==
"KeypointsMP")
88 ARMARX_IMPORTANT <<
"initialize input output buffers between KeypointsMP and keypoint controllers";
90 auto in = std::dynamic_pointer_cast<mp::KeypointsMPInput>(mp.second.input);
91 in->keypointPosition =
controller.s.filteredKeypointPosition;
92 in->keypointVelocity =
controller.s.currentKeypointVelocity;
94 auto out = std::dynamic_pointer_cast<mp::KeypointsMPOutput>(mp.second.output);
95 out->keypointPosition =
controller.s.filteredKeypointPosition;
96 out->keypointVelocity =
controller.s.currentKeypointVelocity;