Introduction

  This project was completed as part of my robotics class during the spring semester of my junior year at Tufts. The project requirements were to work with a partner to create a pair of waltzing robots that spun around one another in a waltz when music was played. Although my partner and I built different robots, we worked together extensively to integrate them so that they would dance well together. Below is a video that walks through our project explaining what we did, what challenges we encountered, and what we ultimately achieved.

Project Walkthrough


Reflection

  In designing the waltzing robots, I learned many valuable lessons (that whole school thing's paying off after all!). On the technical side, I was exposed to some of the challenges associated with processing sound data and learned how to implement a fourier transform in Python. I found it particularly valuable to implement the fourier transform in Python as I was also simultaneously discussing the fourier transform in two other classes. In Experiments, we had just learned how to build a discrete fourier transform program in LabVIEW to evaluate the frequency differences present in the pronunciation of different vowels. In High Reynolds Flow, we had learned how fourier transforms could also be used to convert governing flow equations to wave space for use in spectral turbulence models. Seeing the same idea pop up in a variety of forms helped strengthen my understanding of fourier transforms.

  Another important technical skill that I learned was how to use machine learning algorithms—like k-nearest neighbors—to quickly train a robot in a new environment. Using the k-nearest neighbors algorithm to train the robot to recognize the line before dancing made it more robust at recognizing the line than if we had hard coded a color value for the line. Hard coding the value only works well when the environmental conditions remain similar to when you had experimentally determined what the value should be. For example, if we had hard coded the line detection in a dimly lit classroom and then tried to use that same line detection algorithm in bright daylight outside, it's unlikely we'd see the same performance. Although I had done some work with machine learning algorithms in a programming class a couple of years ago, applying them in this context was eye-opening.

  Beyond purely technical skills, I also learned some bigger picture lessons regarding project management. One of these lessons was to keep many potential project development paths available. As was evident from the diversity of waltzing robots in our class, there are always many ways to solve a problem and there's no reason to cut off all other development paths when you're not sure if the one you're on will even be successful. After travelling down a number of paths only to not be able to achieve what we desired, I learned to keep my options open. This idea ties into the notion of recognizing when to move between hardware and software solutions when addressing issues with the robot design. For example, we had initially decided to use hardware to maintain a constant radius between our dancers by using arms to link the two dancers. Seeing that this prevented the wheels from making good contact with the ground, we then moved to use software to maintain a constant radius between our dancers using an algorithm based on experimental data. Understanding that a single issue may have many solutions both in software and hardware was reiterated in my Controls class where we learned that system performance could be adjusted by changing a variety of system components such as the plant (hardware), the controller (software or hardware), or the sensor (hardware).

  Another important lesson that I learned on the project management side was how difficult it can be to make a system platform independent. In other words, code that I wrote for my robot rarely worked on my partner's robot. For example, the algorithm I wrote for driving in a circle of set radius would have to be adjusted for my partner's robot to account for the different distance between the wheels and different loading on the motors. Another example was that while I was able to adjust my chunk size and read rate for the sound data on my Raspberry Pi, my partner could not run the same code despite having the same version of the library used to process the sound data (PyAudio). The waltzing robots taught me many things, but one of my most valuable takeaways was inspiration and confidence to tackle new robotics projects!