I am trying out the serial chain manipulator
example 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, 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?