GSoC 2021 Report Sudeep Sidhu : Implement JointsMethod - sympy/sympy GitHub Wiki
This report summaries the work I have done during GSoC 2021 for SymPy. The links to the PRs are in chronological order.
About Me
I'm Sudeep Sidhu, a third year undergraduate student majoring in Information Technology from Maharaja Surajmal Institute of Technology, Delhi.
Project Synopsis
My project was to implement various Joints
and a JointsMethod
using which one can formulate systems kinetic differential equations and do all the kinematics by itself. Weekly progress can be tracked on my blog.
Pull Requests
Major
-
#21564 : Implement PinJoint and Joint class - This PR focused on implementing a base abstract class
Joint
which will be inherited by other joint classes and can also be used to create custom joints, implementsPinJoint
which can do all kinematics for pin joint. -
#21674 : Implement Sliding Joint - Implemented
PrismaticJoint
class which can do all kinematics of prismatic(sliding) joint. -
#21689 : Add new features to class body -
Body
andReferenceFrame
are analogous to each other so added some required attributes toBody
. -
#21700 : Add basis vector to Body - Allow
Body's axes
to work same asReferenceFrame
. -
#21712 : Implement Forces and Torques - Make class
Body
handle forces and torques while following third law of motion. -
#21730 : Check if velocity is defined in frame before taking derivative of pos - If velocity is not defined wrt required frame then try to find velocity in intermediate frame first instead of straight away taking derivative of position vector.
-
#21778 : Add new abstract base class for methods - Added a new private abstract base class
_Methods
forLagrangesMethod
,KanesMethod
and any other future methods, to make them have similar attributes. -
#21759 : JointsMethod - Implemented
JointsMethod
class which could use all joints and form systems equation of motions.
Minor
-
#21600 : Adds
angle_between
toPhysics.vector
- Added a new function toVector
class to find angle between two vectors. -
#21662 : Check order of arguments in
orient_axis
- Order of arguments where inverted inorient_axis()
as compared toorient()
, so madeorient_axis()
work with both order of args if type of args is correct. -
#21725 : Unpin the symengine version - Make
travis
to install latestsymengine
version. -
#21728 : Fix failing master branch - Change the usage of pi in joints to make symengine tests pass.
-
#21749 : Add warnings to magnitude and angle_between - Since python ignores the leading
-
sign, added warnings to certain functions which may give incorrect result.
Future Work
- More joints has to be implemented.
- Make
LagrangesMethod
andKanesMethod
API synonymous. - Use images to describe description of
Joints
andJointsMethod
in docstring.
Conclusion
This summer has been a great learning experience and has helped me get a good exposure of test-driven development. I plan to continue contributing to SymPy and will also try to help the new contributors. I am grateful to my mentors, Jason K. Moore and Nikhil Maan for reviewing my work, giving me valuable suggestions, and being readily available for discussions.