ShuoYangRobotics / A1-QP-MPC-Controller

An open source implementation of MIT Cheetah 3 controllers
GNU Affero General Public License v3.0
630 stars 129 forks source link

Why using inverse kinematics instead of the jacobian transpose in swing leg PD control? #10

Closed chalkchalk closed 2 years ago

chalkchalk commented 2 years ago

RT. In swing leg control, the code uses the inverse kinematics for torque calculation Eigen::Vector3d force_tgt = state.km_foot.cwiseProduct(state.foot_forces_kin.block<3, 1>(0, i)); joint_torques.segment<3>(i * 3) = jac.lu().solve(force_tgt); While in the original paper

Bledt, G., Powell, M. J., Katz, B., Di Carlo, J., Wensing, P. M., & Kim, S. (2018). MIT Cheetah 3: Design and Control of a Robust, Dynamic Quadruped Robot. IEEE International Conference on Intelligent Robots and Systems, 2245–2252. https://doi.org/10.1109/IROS.2018.8593885

the transpose of jacobian is used to calculate the PD control torque in Eq.(8). What is the difference between these two approaches? Feel free to use Chinese.

ShuoYangRobotics commented 2 years ago

There are different ways to derive swing leg controller. Our approach is a simplified workspace dynamics.

Empirically they are the same when the robot is slow. When the robot moves very fast, the dynamic effects of legs need to be considered so the original paper's approach may works better.