William’s Status Report for 4/16

This week, I spent a lot of time trying to devise a way to get velocity data relative to the Earth’s axes from the IMU. I tried using a SciPy library skinematics, which uses analytical methods to find the orientation and positions. After lots of testing on that library, I realized that the madgwick algorithm I had been using is markedly more accurate than the skinematics analytical method for finding orientations. In addition, I tried implementing a technique for using my original madgwick algorithm and combining it with the SciPy position finding algorithm. However, after testing that method, I came to the conclusion that the data we were getting from that algorithm was not accurate enough for the purposes of our game.

With that, I met with Henry to discuss a pivot in our plan so that we could have a game that would not rely heavily on position/velocity data from the IMU. We redefined our game so that it would have a finite set of swing types and ball flights that would be easier to define as a function of just IMU orientation data and raw acceleration data relative to the IMU’s axes. For example, we can determine whether a swing is forehand or backhand  by checking whether the integral of acceleration over time in the IMU’s z-axis is positive or negative, without needing to know what the acceleration is relative to Earth’s axes. In addition, we can determine whether the shot is a lob or smash by checking the roll of the paddle from the IMU orientation, and also whether there is spin by checking the acceleration along the IMU’s X and Y axes. Based on the type of swing, we can then determine what type of ball flight we have.

With this infrastructure defined quite rigorously, this week and next week I will work on doing a large sample of different swing types, gathering the data, and defining thresholds that will help us determine what swing type and ball flight we have based on the paddle sensor data. The goal is to have well-defined thresholds that can make the user gameplay relatively simple. In addition, I will try to 3-d print a paddle with the sensors embedded in them, and continue the process of integrating my sensor unit with the game engine.

Leave a Reply

Your email address will not be published. Required fields are marked *