27 NJointControllerRegistration<NJointKeypointsAdmittanceMPController>
29 "NJointKeypointsAdmittanceMPController");
33 const NJointControllerConfigPtr& config,
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;
void writeControlStruct()
law::KeypointsAdmittanceController::Config & getWriterControlStruct()
void reconfigureMPs(const MPListConfig &mpListConfig)
void createMPs(const MPListConfig &mpListConfig)
std::map< std::string, MPInputOutput > mps
TripleBuffer< law::KeypointsAdmittanceController::Status > controlStatusBuffer
set buffers
NJointKeypointsAdmittanceController(const RobotUnitPtr &robotUnit, const NJointControllerConfigPtr &config, const VirtualRobot::RobotPtr &)
void reconfigureController(const std::string &filename, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
set control target
std::string configFileName
variables
void rtPreActivateController() override
This function is called before the controller is activated.
void additionalTask() override
NJointKeypointsAdmittanceMPController(const RobotUnitPtr &robotUnit, const NJointControllerConfigPtr &config, const VirtualRobot::RobotPtr &)
void reconfigureController(const std::string &filename, const Ice::Current &) override
std::string getClassName(const Ice::Current &) const override
void rtPreActivateController() override
This function is called before the controller is activated.
#define ARMARX_IMPORTANT
The logging level for always important information, but expected behaviour (in contrast to ARMARX_WAR...
std::shared_ptr< class Robot > RobotPtr
This file is part of ArmarX.
std::shared_ptr< KeypointsMPInput > KeypointsMPInputPtr
std::shared_ptr< KeypointsMPOutput > KeypointsMPOutputPtr
This file is part of ArmarX.
NJointControllerRegistration< NJointKeypointsAdmittanceMPController > registrationControllerNJointKeypointsAdmittanceMPController("NJointKeypointsAdmittanceMPController")
IceUtil::Handle< class RobotUnit > RobotUnitPtr