improve joint velocity in control loop enabled

Typically: "How do I... ", "How can I... " questions
Post Reply
xxm
Posts: 28
Joined: 26 Oct 2020, 09:36

improve joint velocity in control loop enabled

Post 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!

coppelia
Site Admin
Posts: 10375
Joined: 14 Dec 2012, 00:25

Re: improve joint velocity in control loop enabled

Post 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

xxm
Posts: 28
Joined: 26 Oct 2020, 09:36

Re: improve joint velocity in control loop enabled

Post 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 ?

coppelia
Site Admin
Posts: 10375
Joined: 14 Dec 2012, 00:25

Re: improve joint velocity in control loop enabled

Post 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

Post Reply