Locking a joint angle

Typically: "How do I... ", "How can I... " questions
Post Reply
johnrowlay
Posts: 25
Joined: 09 Aug 2017, 18:52

Locking a joint angle

Post by johnrowlay »

Hello,

I have a robot arm in V-Rep, which has a two-fingered gripper. What I want to do, is to maintain the gripper in the "closed" position, such that the two fingers are just touching each other. The robot will then interact with some objects on a table.

To do this, in the Joint Properties dialog, I have set both of the finger joints to "Torque/Force mode", and then in the "Position [deg]" field, I have set the required angle which would cause the gripper to be closed. This works well most of the time.

However, during some interactions with objects, the objects cause the grippers to open. Once this happens, the fingers do not return to their closed position, and they remain open for the remainder of the simulation.

So, I have two questions:

1) Why do the fingers remain "open" in this case, rather than returning to their "closed" position? I have set the target position in the "Position [deg]" field, so I don't understand why the PID controller doesn't then continually try to reach this position.

2) Given that I actually do not want to control the fingers at all, and just want them to be rigidly set at a certain joint angle, is there a better way to achieve what I want? Is it possible to just "lock" a joint, such that it never moves when a force is applied, and effectively behaves as a rigid body "fused" with its parent object?

Thanks.

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

Re: Locking a joint angle

Post by coppelia »

Hello,

Which physics engine are you using? did you try to see what happens with a different physics engine?
Sometimes, depending on the situation/physics engine, there are some weird behaviour that is directly linked to how the physics engine is internally handling stuff, and its settings (with Bullet, e.g. Normal CFM, Stop ERP or Stop CFM).

Cheers

johnrowlay
Posts: 25
Joined: 09 Aug 2017, 18:52

Re: Locking a joint angle

Post by johnrowlay »

Hello,

I am using the Vortex physics engine. But I seem to remember that the same thing sometimes happens with other physics engines too.

If a joint is moved due to interaction with an object, then should it always be reset to the value in "Position [deg]" through the PID controller? Or should it just remain at this new position?

And is there a way to rigidly lock the joint, so that it acts like a rigid body?

Thank you.

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

Re: Locking a joint angle

Post by coppelia »

the PID controller will always try to move the joint towards the indicated desired position. If it does not, then you have several possibilities:
  • The joint doesn't have enough force/torque
  • The joint is behaving strangely because of how it internally operates (physics engine dependent)
  • The joint is hindered in some way. Another constrain might be the reason (e.g. a collision with some other object, or the mesh entered another mesh and got trapped. Turn display of contact points on to see what is going on.
You cannot directly lock a joint. But you can do some messy (not recommended) things link temporarily removing the finger from the physics engine representation and replacing it with a finger rigidly attached to the hand via a force/torque sensor..

Cheers

Post Reply