How to change the joint force during Position control (PID)

Typically: "How do I... ", "How can I... " questions
Post Reply
narutom
Posts: 5
Joined: 07 Jan 2019, 04:24

How to change the joint force during Position control (PID)

Post by narutom » 13 Nov 2019, 12:19

Hello

I build a snake robot model. The joints are running in Torque or force mode. The joint motor is enabled and the control loop is enabled. I use Position control (PID) to control the robot and I want to change the force in the joint during the simulation. I use vrep.simxSetJointForce to change the maximum torque and vrep.simxGetJointForce to check the joint force. but in the end, it doesn't work.
http://www.coppeliarobotics.com/helpFil ... iption.htm
The joint force seems to be constant.
Is there anyone who can tell me how to calculate the force and change it.
Thanks a lot.

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

Re: How to change the joint force during Position control (PID)

Post by coppelia » 14 Nov 2019, 09:43

Hello,

make sure to carefully read this page, mainly the design considerations. Basically, depending on the used physics engines, you can't use the same masses/inertias as in the real robot. There should be more balanced-out. Typically a situation like:

Code: Select all

mass10 --> joint --> mass0.1
will be almost impossible to correctly simulate, except if you use the Vortex engine or maybe the Newton engine. Other engines won't be able to handle that well, and one effect can be that the joint can't exert the force it should.

Have a look how the other example snake robots in the model library were made to get an idea of what might be wrong in your situation.

Cheers

narutom
Posts: 5
Joined: 07 Jan 2019, 04:24

Re: How to change the joint force during Position control (PID)

Post by narutom » 14 Nov 2019, 10:11

thank you a lot, I will try it.

Post Reply