In the last several days I’ve made a lot of updates to tools for using PyDy and have come very close to settling on the way that PyDy is used to derive the equations of motion. I have added and updated several examples, including the double pendulum and a rigid body with two reaction wheels used for attitude control. Animations for each example have been added using visual python, so visualization of the dynamics is very tangible.
There are two main things that I am still trying to iron out with PyDy. The first is how to handle ignorable coordinates and how to allow for the user to control whether or not they are included in the output equations of motion. For example, for the symmetric rolling disc, there are 4 ignorable coordinates: two for the location in the ground plane, one for the heading and one for the spin. For purposes of stability analysis, the kinematic differential equations associated with these coordinates are not needed. However, for purposes of animation, these equations are needed. My goal is to make it easy to clearly specify whether or not these equations are desired in the output equations.
The second major thing that still needs work is handling dependent generalized speeds in nonholonomic systems. When the motion equations are generated, they will involve these dependent generalized speeds, and their time derivatives, but these quantities can be computed from the constraint equations and therefore can be left implicit in the final equations of motion. The derivatives of the dependent generalized can be intelligently computed by some careful formations of the gradients of the components of the matrix that relates the dependent speeds to the independent ones.
I will be working on both of these tasks this week and will be writing examples for the Whipple bicycle model in addition to a spinning top and the rattleback.