Revolute joint

81 views
Skip to first unread message

Davide

unread,
Nov 16, 2023, 11:51:24 AM11/16/23
to ProjectChrono
Hi everyone,
I'm trying to make a pendulum constraining it using a revolute joint. It gives me no error, but it doesn't oscillate and i'm not understanding why. Anyone might help me please?
Revolute_joint.txt

JASON Z

unread,
Nov 16, 2023, 10:08:31 PM11/16/23
to ProjectChrono
I am suspecting you didn't define your revolute axis.........

Take a look at demo_MBS_suspension:

        // .. create the revolute joint between the wheel and the spindle
        link_revoluteRB = chrono_types::make_shared<ChLinkLockRevolute>();  // right, back, upper, 1
        link_revoluteRB->Initialize(wheelRB, spindleRB,
                                    ChCoordsys<>(ChVector<>(1.5, 1, -1), chrono::Q_from_AngAxis(CH_C_PI / 2, VECT_Y)));
        sys.AddLink(link_revoluteRB);

Radu Serban

unread,
Nov 17, 2023, 7:25:41 AM11/17/23
to ProjectChrono

Jason - there is no way to create a revolute joint without “defining the revolute axis”!

The third argument of the Initialize() function for a revolute joint provides a full coordinate system.  If the rotation part is not specified, it is set to be the unit quaternion (indicating an identity rotation).  For this particular signature of the Initialize() function, that coordinate system represents the joint frame expressed in the absolute coordinate system.  The revolute joint is constructed with its rotation axis along the Z axis of that joint frame.  In other words, if the joint frame has an identity rotation, the revolute joint axis will pe parallel to the global Z axis.

 

Davide - the problem with your model is simply that you have the revolute axis passing through the center of mass and as such the gravity does not produce any torque to move the body. In other words, your system is in an (unstable) equilibrium position.  In the Irrlicht visualization window, press the “i” key which will bring up a panel where you can enable visualization of the body and joint frames and you should see what I mean.  In the code you provided, try to set the joint frame slightly off the center of mass (for example, use ChVector<>(0.1, 3, 0)).  That should give a non-zero arm to the gravitational force and produce a torque that will move your body.

 

--Radu

--
You received this message because you are subscribed to the Google Groups "ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projectchron...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/4fa53d76-510a-4bb6-8053-b86d8e69baa3n%40googlegroups.com.

Davide

unread,
Nov 17, 2023, 11:07:29 AM11/17/23
to Radu Serban, ProjectChrono
Thank you very much Radu, now it works!! 


Reply all
Reply to author
Forward
0 new messages