The goal for this sprint was to get the pan-and-tilt part of our automated tripod working. We 3D-printed the pan-tilt mechanism, which would contain the DSLR camera, and programmed two stepper motors to rotate the camera using this mechanism. Only vertical motion was finalized with this design due to mechanical errors, which would be fixed in later sprints.
The mechanical goal for Sprint 2 was to completely finish CAD for the entire tripod design and begin working on fabrication for the final assembly. The pan-and-tilt mechanism was 3D-printed, with stepper motors screwed into place and attached to gears so it could vertically tilt and horizontally pan the camera around. Fabrication of the main tripod was also started.
For this sprint, the primary software goal was to find a more adaptable person recognition algorithm. For an algorithm to meet our needs it would have to fulfill two criteria. First, it needs to track the full body, and work in a range of poses for a range of people. Secondly, it needs to be able to run on a Raspberry Pi 4. This is by far our largest limitation, since object detection algorithms that are conventionally considered fast, wouldn't have sufficient performance on our Raspberry Pi. Solutions such as YOLO or TensorFlow either didn't run or were too slow, yet some sort of machine learning approach was still needed in order to fit our first criteria. Eventually we settled on a Single-Shot multibox Detection network initialized with OpenCV's dnn Detection Model class, trained on the COCO dataset. With this algorithm implemented, we could now place a bounding box around a wide range of subjects and poses, resolving the bias issues of our previous implementation. However, since the code was re-detecting every frame, we were only getting about 5 frames a second.
One major step forward this sprint was switching from servos to stepper motors to rotate the camera. We decided on using A4988 stepper motor drivers and a CNC motorshield attached to the Arduino UNO R3 to control the steppers. The code controlling the stepper motors also was adjusted to separately command the x and y motors to rotate the camera until it centered in on the face.