coordinate systems

Performance of common biomechanics linear algebra operations in Numpy

Klevis Aliaj
950 words
Before building more complex logic into my codebase, I wanted to compare the performance of different methods of computing common biomechanics linear algebra operations in Numpy. As is common in biomechanics and robotics, I use a 4x4 homogeneous matrix to represent a coordinate system or pose, and correspondingly 3D vectors are upgraded to homogeneous coordinates. I knew that numpy.einsum could accommodate all linear algebra operations I am interested in performing, but I was curious to compare its performance against numpy.matmul for operations that could be performed just by matrix multiplication. Thanks to Numpy's broadcasting algorithm a considerable number of operation can be performed using numpy.matmul.

Intrinsic and extrinsic rotations

Klevis Aliaj
778 words

In this post I want to explore a simple insight about rotating between two orientations. Rotations are notoriously confusing and unintuitive, as evidenced by the fact that Wikipedia lists six different formalisms for representing rotations. Rotations are important to understand, however, because they play an integral role in physics, robotics, biomechanics, 3D animations, and a multitude of other disciplines.

How not to spill your friend's coffee: tensor invariance under coordinate system transformations

Klevis Aliaj
2083 words
When I first began studying continuum mechanics, tensors were a conundrum to me. I understood how to manipulate them algebraically but obtaining an intuitive understanding of them was a more difficult path. The purpose of this post is to simplify tensors for students who may have also run into the same roadblocks as I did. This post assumes familiarity with orthonormal bases, coordinate systems (frames), and measuring the position and orientation of one frame with respect to another.

Measuring position and orientation (with no mathematical notations)

Klevis Aliaj
873 words
In scientific/engineering endeavors, measuring the position and orientation of an object is important because it allows us to quantify movement characteristics. This post aims to provide a simple explanation of the process of measuring the position and orientation of an object in space. The goal is to not use any mathematical notation, although I presume that we all share a common intuitive understanding of the concept of a point and axis in the 3D space we inhabit. My failure to provide even a decent description of how to measure an object's position and orientation highlights the need for the precision introduced via mathematics (or my inability to explain a simple concepts succinctly - I pick the former). For simplicity, I will only consider measuring the position and orientation of rigid bodies, i.e. objects that do not deform.