Kinovarobotics / Kinova-kortex2_Gen3_G3L

Code examples and API documentation for KINOVA® KORTEX™ robotic arms
https://www.kinovarobotics.com/
Other
117 stars 87 forks source link

How to read applied torque (command torque)? #113

Closed JDchen-Jaden closed 2 years ago

JDchen-Jaden commented 2 years ago

Hi!

I learned that this command base_feedback.actuators(0).torque() is used to read external torque when the robot interacts with the environment.

  1. How to read the applied torque for the actuator itself? I mean, the applied torque is equivalent to the command torque sent to an actuator (assuming it is below the maximum torque).
  2. What if the torque command sent to an actuator is higher than its maximum tolerance?

Thanks a bunch!

Best regards, JD

felixmaisonneuve commented 2 years ago

Hi @JDchen-Jaden,

  1. I feel like base_feedback.actuators(0).torque() should return the actual torque applied to the actuator. I cannot test it at the moment, but if you put your arm in home position and read the torque value of the elbow joint (3rd joint on 6dof and 4th joint on 7dof), you should read a value different from 0.

  2. If maximum torque values is 50Nm and you send a 100Nm command, the command will cap at 50Nm.

Best, Felix

JDchen-Jaden commented 2 years ago

Hi @felixmaisonneuve ,

Thanks! From what I understand about the discussion in #98, base_feedback.actuators(0).torque() only feedback the external torque. I wonder how to know the exact applied torque isolated from the overall torque (including external torque).

Thanks, JD

felixmaisonneuve commented 2 years ago

It might not have been clear in the previous issue, but I meant the value represent the torque produced by all external forces, including gravity. So the value represent the actual applied torque on the actuator. I am not sure what you mean by overall torque.

What are you trying to measure exactly?

JDchen-Jaden commented 2 years ago

Hi @felixmaisonneuve ,

For example, the overall torque is 30 N.m (from base_feedback.actuators(0).torque() ) including 20 N.s command torque and 10 N.m external torque. I was wondering if it is possible to read the command torque and external torque separately.

Thsnks, JD

felixmaisonneuve commented 2 years ago

No it is not possible. You can only read the full torque that is applied by each actuator

JDchen-Jaden commented 2 years ago

Good to learn. Thanks.