The goal of the lab was to create a map of a specific room, which would be used for future navigation and localization tasks. To construct the map, the robot needed to be placed at different points in the room and rotate while collecting ToF readings. The room being mapped, in this case the hallway, was static.
I chose to implement orientation control, where I was able to get my robot to do on-axis turns in small increments using a PID controller.
I used the following code to accomplish collect this data and send it to the Python end via Bluetooth.
I used the following function to implement PID control for the orientation, with a target angle of 25 degrees for each increment.
Below is a video of my robot turning.
I chose to take my measurements in the hallway outside of the lab, starting at the orientation seen below seen below.
Below is a plot of the readings taken from one complete rotation in the hallway.