Open Davide-sd opened 5 months ago
Hi,
my problem was that I didn't set the moments of inertia to the rigidbody
l,m,g,IBxx,IByy,IBzz, = symbols('l m g IBxx IByy IBzz ')
q1, q2, q3 = dynamicsymbols('q1 q2 q3')
q1d, q2d, q3d = dynamicsymbols('q1 q2 q3', 1)
u1, u2, u3 = dynamicsymbols('u1 u2 u3')
u1d, u2d, u3d = dynamicsymbols('u1 u2 u3', 1)
masscenter = Point('masscenter')
frame = ReferenceFrame('frame1')
mass = Symbol('mass')
ceiling = Body('C')
body_inertia = inertia(frame, IBxx, IByy, IBzz)
bob = Body('U', masscenter, mass, frame, body_inertia)
joint = SphericalJoint('P1', ceiling, bob, child_point=l*bob.z, coordinates = [q1, q2, q3], speeds = [u1, u2, u3],rot_order='132', rot_type = 'body')
bob.apply_force(-ceiling.z*bob.mass*g)
method = JointsMethod(ceiling,joint)
method.form_eoms()
here's how it's done.
Hello @zoufaond ,
I stumbled upon this sympy discussion about the 3D pendulum. I'm also trying to set up a 3D pendulum in order to learn the joints method of SymPy, and I'm also facing the problem of non-invertible mass matrix. How did you solve it? Can you share the code?
Thanks for your time.