Sudeep Sidhu Open Source Python Developer

GSoC 2021 - Week 10

Key highlights of this week’s work are:

  • JointsMethod

    • Added 3D test case, chaos pendulum to check JointsMethod is working in all cases. Fixed all reviewed changes and got JointsMethod merged. This marks the completion of my GSoC projects.

GSoC 2021 - Week 9

Key highlights of this week’s work are:

  • JointsMethod

    • Added docstrings and an working example for JointsMethod. Made JointsMethod convert Body objects to RigidBody or Particle, as KanesMethod and LagrangesMethod doesn’t work with Body.

GSoC 2021 - Week 8

Key highlights of this week’s work are:

  • JointsMethod

    • Made KanesMethod and LagrangesMethod alot similar than before by giving them similar properties so that we can use duck typing in form_eoms method function in JointsMethod. Extended the double pendulum test case.

GSoC 2021 - Week 7

Key highlights of this week’s work are:

  • JointsMethod

    • Made JointsMethod work with both KanesMethod and LagrangesMethod and with all other future methods too if they are made according to previous methods. Also explicitly added kinetic_energy to class Body since compiler can’t decide a Body object is a RigidBody or Particle because Body inherits both classes so introduced is_particle and is_rigidbody to Body, Particle and RigidBody so that they can be differentiated.

  • Add new abstract base class for methods

    • Added a new class _Methods, which is to be inherited by KanesMethod, LagrangesMethod and other methods which would be made in future to make them similar to each other and make all methods to work with JointsMethod.

GSoC 2021 - Week 5 and Week 6

Key highlights of this week’s work are:

  • Unpin the symengine version

    • Once the PinJoint was merged the master branch started failing on master branch because the symengine version in optional dependencies was pinned to an old build. So this PR unpins that version so that always the latest version of symengine is installed.

  • Fix failing master branch

    • This PR aimed to change the use case of pi in Joints which was causing the master build to fail.

  • Check if velocity is defined in frame before taking derivative of pos

    • While working on PrismaticJoint I found a hidden test case of automatic calculation of velocity. In joints we have a limitation that we can set relation of child body to immediate parent body only. In a chain/series of joints there is no way to set relation of child body to any other parent body, in that case we need a way to compute velocity relations(we can already compute pos relations). The automatic velocity calculation accounted only for the differentiation of the related position vector rather than checking defined velocity in intermediate frames. So this PR aims to check velocity in intermediate frame first before looking at position vector.

  • Add warnings to magnitude and angle_between

    • Python ignores the leading negative sign while computing so that could lead to an inappropriate result. So added Warnings section to magnitude and angle_between functions of class Vector in physics.mechanics to make user aware of it.

  • Implement forces and torques

    • All forces and torques would be attached to their respective bodies on which they are acted upon. So made .loads attribute of class Body immutable to have complete control over the forces and torques added. Made .apply_force() and .apply_torque() to handle equal and opposite forces/torques. Also added clear_loads() function to clear all the loads from a body and a remove_load function to remove entire torque from the body or entire force from a point on the body.

  • JointsMethod

    • Made a method JointsMethod to form the equations of motion of a system created with joints. It takes an inertial frame/body and all the joints and then computes all kdes using Kane’s method in backend. It has all attributes of Kane’s method.