This commit is contained in:
Paul Blum 2025-04-15 07:57:50 +00:00 committed by GitHub
commit 4cccaeb7bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -177,7 +177,8 @@ namespace unitree_legged_control
currentPos = joint.getPosition();
currentVel = computeVel(currentPos, (double)lastState.q, (double)lastState.dq, period.toSec());
calcTorque = computeTorque(currentPos, currentVel, servoCmd);
calcTorque = servoCmd.torque + servoCmd.posStiffness*(servoCmd.pos - currentPos)
+ servoCmd.velStiffness*(servoCmd.vel - currentVel);
effortLimits(calcTorque);
joint.setCommand(calcTorque);