unitreerobotics / unitree_actuator_sdk

BSD 3-Clause "New" or "Revised" License
37 stars 14 forks source link

How to Use Mixed Mode #4

Closed yuna-hyu closed 1 year ago

yuna-hyu commented 1 year ago

image

I want to control the mixed mode in the A1 motor datasheet.

For example, I would like to provide torque and position at once. Could you provide me with an example related to this?

xiaoliangstd commented 1 year ago

Usually the mixed model will be used in controlling the actuated joints of a legged robot.

In such a scenario, the feed-forward torque tau_ff, desired joint position q_des and desired joint velocity qd_des will be sent to the low level motor together. Then the overall torque is controller as follows: tau = tau_ff + Kp (q - q_des) + Kd (qd - qd_des), where Kp, Kd can also be set and tuned on your own.

Then let's get back to your question, if you wanna only control torque and position, you could kindly set Kd to zero~

xiaoliangstd commented 1 year ago

You can refer to this project https://github.com/mit-biomimetics/Cheetah-Software, the WBC controller in this project can output joint torque、joint position 、joint velocity at once.