Ashwin, The Joints module was added recently and may very well have bugs. The Joint formulation should produce the same results as https://pydy.readthedocs.io/en/latest/examples/multidof-holonomic.html. I don't remember precisely but it should have generated the same results when we merged in the new functionality.
The calls to v2pt_theory() in PinJoint should be applied on any points that are moving in the frame/body. Please open an issue on Github and report a reproducible example there that demonstrates the bug. Thanks, Jason moorepants.info +01 530-601-9791 On Fri, Jan 21, 2022 at 3:45 PM Ashwin Khadke <ash22...@gmail.com> wrote: > I am trying out the serial chain manipulator example > <https://docs.sympy.org/latest/modules/physics/mechanics/examples/multi_degree_freedom_holonomic_system.html> > in the sympy mechanics docs but am finding out that the kinematics sympy > computes in the backend are buggy. I am attaching the file I use to test > it. In the example > <https://docs.sympy.org/latest/modules/physics/mechanics/examples/multi_degree_freedom_holonomic_system.html>, > the velocity of the center of mass of the simple pendulum *should be : > u1(t)*N_frame.x + l*u2(t)*B_frame.x + l*(u2(t) + u3(t))*C_frame.x*. > However, *sympy returns : u1(t)*N_frame.x + l*u3(t)/3*B_frame.x + > l*u3(t)*C_frame.x*. > > I tried to investigate this by looking at the definition of a PinJoint in > sympy. It turns out every joint, when initialized calls the > *_set_linear_velocity* function. In case of the PinJoint the > *_set_linear_velocity* function calls > *child.masscenter.v2pt_theory(parent.masscenter, > parent.frame, child.frame)* to impose velocity constraints between the > child and parent link mass centers. The v2pt_theory function operates under > the assumption that child and parent mass centers are fixed in the child > frame (frame attached to the center of mass of the child). This would hold > true if the parent link has mass concentrated at one end (or at the joint > i.e. COM and joint location coincide) but not if the joint location is > anywhere other than the COM of the parent link. > > Is there a way to define a serial chain manipulator in sympy without > making such assumptions about the mass distribution of the links? > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sympy+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/c4d9c1aa-49b3-44b5-81a9-d794e26e2c86n%40googlegroups.com > <https://groups.google.com/d/msgid/sympy/c4d9c1aa-49b3-44b5-81a9-d794e26e2c86n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAP7f1Ag3dOzUoqL4_FDzYF0y9A86cWvhy5Q79scrn5RmkSBU1Q%40mail.gmail.com.