Torque

Typically: "How do I... ", "How can I... " questions
Post Reply
TeixeiraT
Posts: 3
Joined: 13 Feb 2019, 20:45

Torque

Post by TeixeiraT » 19 Feb 2019, 00:13

Hello,

I am a computer science university student looking for help reading and applying torque to a nut on a bolt. My current implementation of torque consists of a revolute joint with an applied force and velocity that has my robot as its parent and a socket as its child in the hierarchy. I then have a force sensor with the socket as the parent and the nut as the child. I am trying to use the read force sensor function in a threaded child script (lua) to output the current torque on the nut, but am having trouble implementing this. I do not have much experience with V-REP or with torque in general (as I am a software guy) so it may be that I going about this completely wrong. Any help that can be provided is much appreciated.

Thanks

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

Re: Torque

Post by coppelia » 20 Feb 2019, 13:55

Hello,

this can be quite tricky to simulate. You have several options, but do not try to handle friction via mesh-mesh collisions: this won't work! So make sure that your bolt and nuts are not respondable to each other.

start with:

Code: Select all

world --> boltShape --> revoluteJoint --> nutShape --> forceTorqueSensor --> robotGripperShape --> etc.
Above is actually better if implemented like:

Code: Select all

world --> boltShape --> revoluteJoint --> nutShape --> loopClosureDummyA
      --> robotBase --> ... --> robotWristShape --> forceTorqueSensor --> loopClosureDummyB
Where loopClosureDummyA and loopClosureDummyB are linked via a Dynamics, overlap constraint link.

Then you can set a torque to your joint --> you can read that torque in the force/torque sensor.
You can also leave the joint unactuated, add add a torque to the nutShape via sim.addForceAndTorque

Cheers

TeixeiraT
Posts: 3
Joined: 13 Feb 2019, 20:45

Re: Torque

Post by TeixeiraT » 24 Feb 2019, 03:43

In my current implementation I see X, Y, and Z values oscillating rapidly between positive and negative values of low magnitude. The values given are generally quite small, usually values like 0.000007 or -0.0000005. I imagine this is not the correct output. What kind of values should I be expecting when reading the force sensor?

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

Re: Torque

Post by coppelia » 01 Mar 2019, 14:21

Try to check with the other physics engines. If you get similar results, then this is probably what you are expected to get.

Cheers

TeixeiraT
Posts: 3
Joined: 13 Feb 2019, 20:45

Re: Torque

Post by TeixeiraT » 07 Mar 2019, 22:21

I'm unsure if this is the setup you mentioned. Could you confirm if this should be displaying proper values?

Picture of hierarchy:
https://imgur.com/4Oanlkm

.ttt file of project:
https://www.dropbox.com/s/02bbelsmjti30 ... e.ttt?dl=0

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

Re: Torque

Post by coppelia » 08 Mar 2019, 13:30

Make sure to carefully read this page. Your nut has a inertia that is way too small.

Cheers

Post Reply