test_hingedRigidBodyMotor
- test_hingedRigidBodyMotor.make_reset_ready_module()[source]
Return a module with both required input messages connected.
- test_hingedRigidBodyMotor.run_motor_case(K, P, sensedTheta, sensedThetaDot, refTheta, refThetaDot, uMax)[source]
Run one controller configuration and return its torque output.
- test_hingedRigidBodyMotor.test_hingedRigidBodyMotor(K, P, sensedTheta, sensedThetaDot, refTheta, refThetaDot, uMax, expectedTorque)[source]
Validation Test Description
Verify that the module output matches the PD control law with torque saturation disabled and with a configured symmetric torque limit. The cases exercise positive and negative saturation, a command inside the limit, and a zero limit.
Test Parameter Discussion
KandPare nonnegative controller gains, including proportional-only, rate-only, and zero-gain cases. The sensed and reference hinge states produce both signs of raw torque command.uMaxis either left at its negative default, set above or below the raw command magnitude, or set to zero.Description of Variables Being Tested
The first element of
motorTorqueOutMsg.motorTorqueis compared with the independently evaluated and clamped controller torque.