GSoC 2021 - Week 5 and Week 6
20 Jul 2021Key highlights
of this week’s work are:
-
- Once the
PinJoint
was merged the master branch started failing on master branch because thesymengine
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.
- Once the
-
- This PR aimed to change the use case of
pi
inJoints
which was causing the master build to fail.
- This PR aimed to change the use case of
-
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.
- While working on
-
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 tomagnitude
andangle_between
functions of classVector
inphysics.mechanics
to make user aware of it.
- Python ignores the leading negative sign while computing so that could lead
to an inappropriate result. So added
-
- All forces and torques would be attached to their respective bodies on which they are acted upon.
So made
.loads
attribute of classBody
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 addedclear_loads()
function to clear all the loads from a body and aremove_load
function to remove entire torque from the body or entire force from a point on the body.
- All forces and torques would be attached to their respective bodies on which they are acted upon.
So made
-
- 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.
- Made a method