unitreerobotics / unitree_actuator_sdk

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

Can you provide an example of force mixed mode for A1 motor? #3

Closed MinchangSung0223 closed 1 year ago

MinchangSung0223 commented 1 year ago

I want to limit the maximum force of the motor.

          cmd.T = maxForce;
          cmd.W = 0.0;
          cmd.Pos = targetPos;
          cmd.K_P = 0.1;
          cmd.K_W = 3.0;

Is it possible to limit it like the method above?

Can you provide an example of force mixed mode for A1 motor?

xiaoliangstd commented 1 year ago

Sorry, in this version of firmware, the maximum torque cannot be limited。

xiaoliangstd commented 1 year ago

The actual torque generated by the motor can be calculated by this formula:tau = tau_ff + Kp (q - q_des) + Kd (qd - qd_des).Here, you can just calculate, but not limit the maximum torque generated by the motor via unitree_actuator_sdk.

MinchangSung0223 commented 1 year ago

Thank you for the response