I started by looking for visualizations of Dijkstra’s algorithm. I was considering using nodes based on weight as the representation but decided that I wanted an application closer to the robots that my research group was working on. I couldn’t find any that I thought were unique enough since the goal was to go for breadth with visualizations and algorithms. I decided to go with a hexagon based visualization so that the distance to move in any of the six directions was the same. I was able to create a visualization, but the amount of time it took for me to complete it was longer than expected because the way I manipulated the squares in my A* implementation did not work for this implementation with hexagons visually speaking.
I finished implementing the Bug 0 algorithm with the simplified edge detection. I started looking for a different algorithm to implement. I was looking for an algorithm that was considered simple enough for new programmers to learn. I decided to go with Dijkstra’s algorithm since it was the first algorithm most people learn and a lot of relevant algorithms are different versions of it.
I continued to work on the Bug 0 algorithm implementation and finished the visualization. I was implementing edge detection, and it was not working. The problem was that I wanted to have the edge be any shape including a circle and also had something to do with where the bug would and could move in my program. By the end of the week, I looked for types of edge detection methods and compared them to my implementation. I ended up going with a simpler implementation that was compatible with my bug’s movement and square edges.
I collaborated with one of my peers named Rishi on which path planning algorithm to implement moving forward. I researched algorithms that might be worth programming with the scope of the research goal in mind. I picked the Bug 0 algorithm to start with and looked for common visualizations of the algorithm with respect to learning. I started working on its implementation in Julia.
I started working on integrating Lightweight Communications and Marshalling (LCM) for the dualshock 4 data. I ran into the problem of distinguishing axes commands versus button commands when using LCM. I learned about the capability of using multiple channels via LCM, made a button and axis channel, and finished integrating LCM with the dualshock 4.
I finished implementing A* and fixed the visualization bugs. I searched for and found a C++ library for the dualshock 4 data and reprogrammed the visualization code for it in C++ using the new joystick library. I started figuring out how to use Lightweight Communications and Marshalling (LCM) with C++ with the intention of integrating it with the program I wrote for the dualshock 4 data.
I looked for visual representations of the A* algorithm with regards to teaching and found a visual representation that I saw when I learned about A*. I took the visualization and recreated it in the programming language Julia. I applied the algorithm to the representation while allowing flexibility for other algorithms to be programmed and tested against the visualization.
Initially, I planned to write the entire program for accessing the dualshock 4 data from scratch, but I decided to use libraries to finish it since the task needed to be completed relatively quickly. I found a joystick API written in C and finished writing a program in C, along with its makefile, that would output button states while making the program flexible enough to account for velocity commands later on.
I added and tested input checks in an attempt to reduce user error when sharing the program with my peers. I added a text file with instructions on how to run the program via linux terminal. I also added comments in the code to help users understand how to add and test other path planning algorithms, which I intentionally structured the code to allow. I spent the remainder of the week learning how to use Julia with an emphasis on the Makie.jl package and figuring out how to access dualshock 4 data via linux. I learned how to use Julia by slowly making what I wanted with the Makie.jl functions and cherry picking functions along the way. For the dualshock 4 data, I found out where the data could be accessed and attempted to write a C++ program outputing the accessed data to the terminal.
I implemented the A* algorithm with a straight-line distance heuristic in C++. The user would input a text file map and the program would output the map with the optimal route. After passing the tests I created for this program, I rewrote the program with the intent of optimizing the performance and readability of the code and added a makefile. Afterwards, I added and tested a feature allowing the user to add comments to the input text files.