Make a revolute joint behave like a spring

Typically: "How do I... ", "How can I... " questions
Post Reply
geerten
Posts: 77
Joined: 14 Feb 2013, 13:57

Make a revolute joint behave like a spring

Post by geerten » 02 May 2013, 14:46

Hi,

I was wondering if it is possible to make a revolute joint behave like a spring. What I'm after is that the joint wants to move to a certain default position, but when something 'pushes' against an object that is attached to the joint, it can be moved (similar to the movement of a spring).

How can I accomplish this?

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

Re: Make a revolute joint behave like a spring

Post by coppelia » 02 May 2013, 15:13

Hello Geerten,

Yes, you can do this in a similar way as you would do it with a prismatic joint. Refer to the spring-damper example in Models/examples/spring-damper.

The joint needs to be in torque/force mode, the motor enabled, the Control loop enabled, Position control (PID) selected, and Regulate torque/force selected.

Then you can adjust the spring and damper with the Proportional parameter and the Derivative parameter. Refer to the joint dialog, the joint dynamics dialog, and this post.

Cheers

geerten
Posts: 77
Joined: 14 Feb 2013, 13:57

Re: Make a revolute joint behave like a spring

Post by geerten » 03 May 2013, 07:40

Ok, thanks. And how can I influence the direction it is 'pushing'?

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

Re: Make a revolute joint behave like a spring

Post by coppelia » 03 May 2013, 09:51

It will always push towards its target position (see this dialog). Try playing with that value and the demo spring model.

Cheers

robwag
Posts: 3
Joined: 16 Feb 2015, 06:42

Re: Make a revolute joint behave like a spring

Post by robwag » 16 Feb 2015, 09:07

Is this example scene available?
Robot Simulator: V-REP Simulation of a Spring-Damper Array
Marc Freese
https://www.youtube.com/watch?v=t1ZaQMDIUl8

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

Re: Make a revolute joint behave like a spring

Post by coppelia » 16 Feb 2015, 21:15

Hello,

the scene is not directly available. But all its content is in the Model library that comes with V-REP. So simply do a few drag-and-drops, and you have a similar scene.

Cheers

robwag
Posts: 3
Joined: 16 Feb 2015, 06:42

Re: Make a revolute joint behave like a spring

Post by robwag » 16 Feb 2015, 22:24

Thanks for the reply.

Ah ha! a few simple drag and drops would be wonderful once experience is gained... However as the domain experts of this wonderful system, as many examples as possible are the best way to share the knowledge. Alas... can you point me to an available scene example before I adventure in the experimental path of menu selections, etc.? Thanks in advance.

Eric
Posts: 186
Joined: 11 Feb 2013, 16:39

Re: Make a revolute joint behave like a spring

Post by Eric » 16 Feb 2015, 22:35

hi...

You don t really need to be a V-REP expert to do the drag and drop of objects and models, all the models of this scene are in the "model browser" on the left side of the window. Please just check it out!

To place them on the scene, if drag and drop is not precise enough you should spend a little time on the first tutorial, you ll learn everything you need to be able to interact with the software to achieve the positioning of objects you wish.

Cheers
Eric

robwag
Posts: 3
Joined: 16 Feb 2015, 06:42

Re: Make a revolute joint behave like a spring

Post by robwag » 17 Feb 2015, 04:28

Hello Eric,

It's not that I haven't tried, it's that I'm not getting the desired results so looking at something else working always seems to raise the confidence for me. I'll do some experiments to work it out since I'm sure it can be done. :)

Regards,

--RW

Post Reply