2d sliding joint with floor (or plane) ?

Typically: "How do I... ", "How can I... " questions
Post Reply
bessemermine
Posts: 16
Joined: 13 Mar 2013, 23:05

2d sliding joint with floor (or plane) ?

Post by bessemermine »

I'm interested in putting together a model that uses a 2d sliding constraint. Specifically, I'd like to constrain the end of the spring to be on a surface, such as a plane or just the ground plane, and the other end to be rigidly attached to a shape (no spherical joint, cantilevered joint effectively). What's the best way to go about constructing something like this?

I'm not sure if I should be using the GCS solver and link dummies, or with a simpler construction.
Here's my attempt to get it working using the joint in IK mode and the GCS solver, as well as a child sprint that constantly updates the position of a "floorFollower" dummy:
https://www.dropbox.com/s/wjji7rf5irmpn ... 20test.ttt

The idea there is that once the spring is working properly, with a high spring constant and high friction, the friction will hold the object on the slope, or at least the spring tension will resist the rotation & rolling of the object on the slope.
(this is a contrived example of a larger robot model, of course).

Even if I can get the GCS & IK solver to work, I wouldn't be able to put the joint into motor/PID/spring mode, would I?

The only other thought I have is to put two perpendicular prismatic joints as children of the floor, set their motion range to be very high, and then somehow get the "springEnd" dummy or a hidden object at the end of the spring to be linked to the planar 2DOF created by those floor joints.

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

Re: 2d sliding joint with floor (or plane) ?

Post by coppelia »

Hello,

Well, you should only use the IK fonctionality when the mechanism is driven by IK only. In your case, it is driven by physics (i.e. you cannot control at every moment the configuration of your system), so you shouldn't use the IK or GCS fonctionality.

If I understood your idea correctly, then your second idea is the good one:

floor --> freePrismaticJoint1 --> smallMass1 --> freePrismaticJoint2 --> smallMass2 --> spring --> endMass

Cheers

bessemermine
Posts: 16
Joined: 13 Mar 2013, 23:05

Re: 2d sliding joint with floor (or plane) ?

Post by bessemermine »

OK, some progress.
Here's a version where the floor respondable is the part of the whole structure:
https://www.dropbox.com/s/e020mfk3czfkj ... parent.ttt

That seems like a somewhat odd way of organizing it, but it does seem to work OK, as far as I can tell. It's hard to say exactly what the expected dynamics are, which is why I'm trying to simulate it.
Also, getting the spring to be pre-stretched into the right place is a little clumsy. Is there any way to do a "move joint" mode, where I'd actually be sliding the prismatic joint (or rotating a revolute joint)?

I also tried using a construction where the floor was only the parent to the joints, and there was a dummy object on the 2d sliding plane they created.
Then, there was a dummy with a dynamics overlap constraint that linked to a dummy at the end of the sphere + spring structure.
https://www.dropbox.com/s/3egxfrystzsxf ... ummies.ttt

This seems to function fairly well, except that there is a lot of out-of-plane bending and compliance in joints, so I'm not sure how believable the solution is.
Can this be tightened up with the right choice of dynamics engine settings?

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

Re: 2d sliding joint with floor (or plane) ?

Post by coppelia »

I had a look at the 2 scenes.

You can make everything much more stable by scaling the masses and inertias of the 3 small masses by a factor 10. Make sure you respect the dynamic design considerations 7 and 8.

You probably know about this, but here a post about how to design your springs.

Cheers

Post Reply