C Programming Projects from ROB 502
The following are select projects that I completed individually for the ROB 502 Programming for Robotics course at the University of Michigan. The majority of this course used the C programming language. It is also worth noting that I scored a perfect 100% overall course grade for the class.
Braitenberg
In this problem I implemented and visualized a simple 2b type Braitenberg vehicle that had two light sensors, a left and right sensor. The more light received by the left sensor, the faster the right wheel of the vehicle turned. Similarly, the more light that the right sensor received, the faster the left wheel turned.
I placed three light sources on a map for a robot to interact with. I also incorporated collision detection code that detected whether the robot collided with the lamp and had the robot resolve the collisions accordingly by moving back half a pixel until there was no longer a collision.
Chase
In this project, I programed one robot (the "chaser") to chase after another robot (the "runner").
Both robots had the ability to perform one of the following actions per time step: 0) do nothing, 1) increase velocity, 2) increase angular velocity clockwise, 3) increase angular velocity counter clockwise (just the chaser).
The runner selected an action to perform at random. A recursive search tree was implemented for the chaser to help it determine the action that it should perform to catch the runner in the least amount of time steps.
Potential
In this project, I used a potential field controller to replace the recursive search tree from the Chase project to determine the movements of my “chaser” robot.
Additionally, I created a command line user interface that allowed the user to live-tune the parameters of the potential field controller using threading.
Bigrams
In this project I created and used a hash table to find the most common bigrams (pairs of consecutive words) in a text file.
The implementation used for this project is very loosely based on/inspired by the Google Abseil (a C++ library) "Swiss Table" family of hash tables.
The image on the left shows the output where I called my bigrams program on a text file of Jane Austen’s Pride and Prejudice. The output in the terminal shows when I had to “rehash” my hash table—when I doubled my hash table size to help reduce the amount of collisions. The output also displays the bigrams that appear at least 200 times in the entire book as well as the total number of different bigrams in the book.