2021 Virtual Undergraduate Research Symposium

2021 Virtual Undergraduate Research Symposium

Property Based Testing on Forward Kinematics in Amino

Property Based Testing on Forward Kinematics in Amino

PROJECT NUMBER: 34 | AUTHOR: Ryker Fish​, Computer Science

MENTOR: Neil Dantam, Computer Science

ABSTRACT

Robot motion planning aims to create autonomous robots that can move from a starting position to a goal position without human input. Robot motion planning uses forward kinematics, a process that lets a robot know the position of its end-effectors, to enable a robot to create a collision free motion plan. Forward kinematics requires a mathematical representation of transformations, but is computationally slow using the standard representation of transformations with matrices. Instead, if matrices are replaced with quaternions, forward kinematics becomes more computationally efficient. In order to verify the correctness of this new scheme, property based testing was done on a library for robot motion planning called Amino. The testing has verified the correctness of Amino’s implementation of forward kinematics using quaternions, resulting in a faster method of computing the position of a robot’s end-effector while remaining accurate.

PRESENTATION

AUTHOR BIOGRAPHY

Ryker Fish is a Junior in Computer Science with a minor in Computational and Applied Mathematics. This year, he began his foray into undergraduate research working on a project focused on robot motion planning for the Dynamic Automata Lab. Going forwards, he would love an opportunity to take part in a research project on cryptography, interstellar communication, or networking.

ADDITIONAL SOURCES

http://amino.dyalab.org/

4 Comments

  1. In the results section of the poster, you stated “Errors were found and corrected in a conversion …”. What were the errors?

    • Thanks for asking a question, Ahmad! The most significant error found had to do with the conversion between quaternions and another representation of rotations called Euler angles. Quaternions have an interesting property where they double cover rotations in R3. In this context, “double cover” means that for any given rotation in three dimensions, there are two quaternions that could represent it. By convention, Amino uses the quaternion with a positive scalar part. The conversion between Euler angles to quaternions gave us the wrong quaternion, which was the most major inconsistency that was fixed.

      There were also some more minor issues that are more related to software engineering and the usability of Amino as a code base that were corrected or improved. However, those aren’t as interesting as the mathematical properties of transformations, so those were not covered in the presentation but are worth a mention.

  2. Hey Ryker!

    First of all, I think this is a very interesting project. I am curious to know more about the 4×4 matrices. What do the rows and columns of the matrices correspond to? Why is the last column the only one that has to do with translation and the rest have to do with rotations? Great presentation!

    • Hi Jessica! Thank you for your question. I definitely skimmed over the nitty-gritty details of the math, but since you’re interested I’d love to talk about it more.

      The 4×4 matrix shown is known as a transformation matrix. I like to think of it as having two discrete parts- the upper left 3×3 represents rotation, while the rightmost column represents translation. The part that represents rotation is known as a rotation matrix, and it’s possible you’ve seen similar constructions if you’ve taken linear algebra or certain mechanical engineering courses.
      The reason a rotation matrix has three rows and three columns has to do with the numbers of ways an object can rotate in three dimensions- you’ve likely heard of them as roll, pitch, and yaw before. The 3×3 size lets us capture all that information, although there are other ways of capturing the same information with fewer elements, such as quaternions or Euler angles.
      The final column of the transformation matrix has four elements, but only the top three have a meaning. The first three elements represent a translation, or a linear shift, along the x, y, and z axes. This is similar to rotation matrices- three directions of movement requires three components to capture that information.
      The entire bottom row of the transformation matrix is a bit of a peculiarity, and it’s one of the negatives to using transformation matrices as a representation. The whole row really has no meaning, but the extra space it takes up is necessary for us to always be able to multiply matrices together, as we will always be able to multiply two 4×4 matrices together in whatever order we choose but it is not possible to multiply two 3×4 matrices together in the same way. This is a downside computationally, as we have to waste memory storing the meaningless data.
      Now, to answer your question directly: the reason the last column is the only one that represents translations is because a transformation matrix is just mashing two different pieces of information together. Rotation and translation are inherently separate actions. However, it is very useful to consider then in tandem since they both have influence over an objects position in space. Because of this, the two representations are combined and the result is the slightly awkward structure of a transformation matrix.

Share This