Page 1 of 1

improve joint velocity in control loop enabled

Posted: 14 Dec 2020, 09:18
by xxm
Hello,

I am using pyrep for reinforcement learning,but now I meet a problem and I can not handle it.

I am using reinforcement learning to make quadrupedal robot learning walking ,and I control joints in torque/force mode,motor is enabled,and control loop is enabled,maximum torque is 1.0e+11 N*m,upper velocity limit is 1.1459e+3 deg/s.PID are 0.1, 0, 0. I use setJointTargetPosition API function to control joints.

After training ,robot learns to walk and velocity is 1000deg/s,but I want my robot to walk more faster,for example 2000deg/s,6000deg/s,but the upper velocity limit is 1.1459e+3,I do not know what should I can do to improve joint velocity in torque/force mode,motor is enabled,and control loop is enabled?

Look forward to your replay!

Re: improve joint velocity in control loop enabled

Posted: 18 Dec 2020, 09:34
by coppelia
Hello,

currently that limit is hard-wired. We'll increase the limit to the upside in next release.
Until then, and as a workaround, use a joint callback function: you will have to implement the P-controller yourself: simply take the code from the joint callback page and adjust it to your need.

Cheers

Re: improve joint velocity in control loop enabled

Posted: 18 Dec 2020, 10:00
by xxm
Hi,

I use pyrep for reinforcement learning with python , joint callback function use lua code ,can the two languages be combined? If can , can you recommend any examples ?

Re: improve joint velocity in control loop enabled

Posted: 18 Dec 2020, 10:31
by coppelia
well, you do not need to combine both languages. But PyRep is operating with and on CoppeliaSim. So when the scene is loaded, the scripts are part of the scene and automatically called appropriately by the simulation loop (which in your case is triggered by PyRep).

So I'd recommend: open the scene in CoppeliaSim, add the joint callback function, save the scene, then try again with PyRep.

Cheers