Skip to content

Commit

Permalink
Fix torque control law
Browse files Browse the repository at this point in the history
  • Loading branch information
isorrentino committed Jun 25, 2024
1 parent 089ff16 commit 625f9c8
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,12 @@ void JointTorqueControlDevice::computeDesiredCurrents()
estimatedFrictionTorques[j] = computeFrictionTorque(j);
}

desiredMotorCurrents[j] = (motorTorqueCurrentParameters[j].kp * (desiredJointTorques[j] - measuredJointTorques[j])
+ motorTorqueCurrentParameters[j].kfc * estimatedFrictionTorques[j]) / motorTorqueCurrentParameters[j].kt;

desiredMotorCurrents[j] = (motorTorqueCurrentParameters[j].kp * desiredJointTorques[j]
+ motorTorqueCurrentParameters[j].kfc * estimatedFrictionTorques[j]) / motorTorqueCurrentParameters[j].kt;
desiredMotorCurrents[j]
= (desiredJointTorques[j]
+ motorTorqueCurrentParameters[j].kp
* (desiredJointTorques[j] - measuredJointTorques[j])
+ motorTorqueCurrentParameters[j].kfc * estimatedFrictionTorques[j])
/ motorTorqueCurrentParameters[j].kt;

desiredMotorCurrents[j] = desiredMotorCurrents[j] / m_gearRatios[j];

Expand Down

0 comments on commit 625f9c8

Please sign in to comment.