2d Pendulum

44 views
Skip to first unread message

Lo L

unread,
Feb 13, 2016, 6:59:24 AM2/13/16
to PyDy
Hello,

I need some help with a pendulum which rotates about 2 axis. Is there any example, that shows how to handle this case? Here is the code I use: rotating box. It should describe a cube which is fixed on one point (O) and can rotate about two axis, but I have some major problems understanding which part is automatically handled and which part the user has to input.

Thanks
nice regards
Lorenz

Jason Moore

unread,
Feb 13, 2016, 8:29:53 AM2/13/16
to py...@googlegroups.com
Lorenz,

I don't think your lines that set point O to zero velocity in all frames is necessary. Setting the velocity in the inertial reference frame to zero is sufficient. I don't understand your kin_diffs either. What are you trying to do with those?

Jason

--
You received this message because you are subscribed to the Google Groups "PyDy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pydy+uns...@googlegroups.com.
To post to this group, send email to py...@googlegroups.com.
Visit this group at https://groups.google.com/group/pydy.
For more options, visit https://groups.google.com/d/optout.

Jason Moore

unread,
Feb 13, 2016, 8:42:00 AM2/13/16
to py...@googlegroups.com
Lorenz,

You are also setting the rotational velocity of the box_cog three times to different values:

box_cog.v2pt_theory(O, I, B)
box_cog.v2pt_theory(O, R1, B)
box_cog.v2pt_theory(O, B, B)
It should just be:

box_cog.v2pt_theory(O, I, B)

How can we run your notebook? What is the FreeCAD lib?

Lo L

unread,
Feb 13, 2016, 3:10:45 PM2/13/16
to PyDy
Thanks for your answer. I have applied your proposals, and also added a third axis. The results look quite good: notebook

The notebook runs with a special kernel to directly connect the FreeCAD-GUI. FreeCAD is an open source CAD system with python bindings. In the notebook the inertia and mass properties are taken from FreeCAD. In the end the motion of the object is brought back to FreeCAD.

Thanks for the nice tutorials, and the good work.
nice regards
Lorenz

Jason Moore

unread,
Feb 16, 2016, 2:07:40 PM2/16/16
to py...@googlegroups.com
Lorenz,

Where do we find all the installation instructions so we can run your notebook? I'd like to see the result but don't know where to start with the free cad stuff and the repository you have.

Jason

--

Lo L

unread,
Feb 17, 2016, 4:21:14 PM2/17/16
to PyDy
Sorry for not posting instructions by now. I have tested the kernel only with linux/ubuntu, so maybe there are difficulties with installation of the kernel.
I have added some informations, how to install the Kernel and how to run the examples. Here are some FreeCAD installation instruction.

nice regards
Lorenz
Reply all
Reply to author
Forward
0 new messages