How well did our finished solution meet our design criteria?
Challenges we encountered
We had three main challenges in this project:
1) Recalibration and color thresholding for color detection with computer vision
2) Consistency with AR tag localization
3) Jerky Movements
The following showcases the initial difficulties we encountered with the color calibration and thresholding for color detection.
detected image coordinates for the red block using our computer vision methods (due to different lighting conditions than the original calibration, orange is incorrectly detected)
the mask generated by filtering for pixels within the color range we initially measured for red (based on original calibration)
During the course of the project, we found that the Sawyer hand camera was inconsistent and slightly unreliable in capturing a large number of AR tags at once. At first, we made plans to implement a sweeping procedure to slowly sweep across the table and localize each AR tag one at a time (greatly increasing the complexity of our project), but we decided against this as it would not have added to the overall functionality in any significant way. Instead, to get around this we manually maneuvered the Sawyer to be closer before each start.
At first, the movements of Sawyer were very jerky, so we had to spend a significant amount of time making it smoother. To do this, we implemented linear trajectories, added waypoints to smooth out movement, and implemented PID Control. We also decreased the overall speed of trajectories. This challenge was overcome, but was much harder to solve than initially expected.
Possible improvements and future extensions
The following are possible areas of future work we would make if given more time to extend our project.
1) Perform searching algorithms and additional sorting algorithms (e.g. Heap Sort, Stalin Sort)
2) Implement real-time error detection + recovery in case of failed pickups
3) Allow for sorting with duplicates
4) Multi-Attribute sorting based on shape and size (in addition to color)
Also, we note that our color detection system is flawed and hacky. If we encounter lighting that does not match our initial calibration and does not correctly detect a block within a given amount of time searching in nearby tolerance ranges, we require human recalibration on the spot. This could be improved by doing automatic light recalibration by detecting how other colors and the overall image has changed. However, as the focus of this project was on sorting with the Sawyer robot, we did not give this much effort.