GSoC 2021 - Week 5 and Week 6
20 Jul 2021Key highlights of this week’s work are:
-
- Once the
PinJointwas merged the master branch started failing on master branch because thesymengineversion 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
piinJointswhich 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
PrismaticJointI 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
Warningssection tomagnitudeandangle_betweenfunctions of classVectorinphysics.mechanicsto 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
.loadsattribute of classBodyimmutable 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_loadfunction 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
JointsMethodto 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