NxRLab / ModernRobotics

Modern Robotics: Mechanics, Planning, and Control Code Library --- The primary purpose of the provided software is to be easy to read and educational, reinforcing the concepts in the book. The code is optimized neither for efficiency nor robustness.
http://modernrobotics.org/
MIT License
1.9k stars 807 forks source link

I have question about ComputedTorque function. #52

Closed sm3304love closed 1 year ago

sm3304love commented 1 year ago

image

In ComputedTorque function, Why term h(θ, ˙θ)_hat is calculated by InverseDynamics(thetalist, dthetalist, ddthetalistd, g, zeros(6, 1), Mlist, Glist, Slist) instead of using VelQuadraticForce and GravityForces?

HuanWeng commented 1 year ago

In that function, $\tau$ is calculated as a sum of $\hat{M}(\theta)(\text{ACCELERATION-VALUE-FROM-PID-TERMS})$ and InverseDynamics(thetalist, dthetalist, ddthetalistd, g, zeros(6, 1), Mlist, Glist, Slist), the later equals to $\hat{M}(\theta)\ddot{\theta_d}+\hat{h}(\theta,\dot{\theta})$.