29 NJointControllerRegistration<NJointKinematicUnitPassThroughController>
31 "NJointKinematicUnitPassThroughController");
35 const NJointKinematicUnitPassThroughControllerConfigPtr& cfg,
42 if (ct->
isA<ControlTarget1DoFActuatorPosition>())
45 sensor.
_float = &(sv->
asA<SensorValue1DoFActuatorPosition>()->position);
47 target.
_float = &(ct->
asA<ControlTarget1DoFActuatorPosition>()->position);
50 else if (ct->
isA<ControlTarget1DoFActuatorVelocity>())
53 sensor.
_float = &(sv->
asA<SensorValue1DoFActuatorVelocity>()->velocity);
55 target.
_float = &(ct->
asA<ControlTarget1DoFActuatorVelocity>()->velocity);
59 else if (ct->
isA<ControlTarget1DoFActuatorTorque>())
77 throw InvalidArgumentException{
"Unsupported control mode: " + cfg->controlMode};