leggedrobotics / raisimLib

RAISIM, A PHYSICS ENGINE FOR ROBOTICS AND AI RESEARCH
http://www.raisim.com
327 stars 50 forks source link

Torque/velocity constraints on joints using PD control #53

Closed dyspr0sium closed 4 years ago

dyspr0sium commented 4 years ago

Hi,

Is there any way to respect the joint torque/velocity limits defined in a URDF file, e.g.

<limit
      lower="-2.1"
      upper="0.3"
      effort="1.5"
      velocity="6.2" />

while using PD_PLUS_FEEDFORWARD_TORQUE control mode? I know that the P and D gains directly affect the output torque and therefore joint velocity, but shouldn't they still be constrained by the torque and velocity limits of each joint?

jhwangbo commented 4 years ago

You can set the torque limit by the '''setActuationLimit''' method. The current version doesnt read it from the urdf. You have to set it in the code. Velocity limit is complicated. Since there can be external forces, hard constraining the velocity doesnt make sense to me.