Hero Image

Conclusion

Discussion

Our finished solution was able to fulfill the most critical parts of the original goals, which includes: Implementing a functional MPC controller and utilizing computer vision for ball tracking. Though we are not able to develop a ball-strike algorithm that achieves a specific rebound trajectory based on the ball's initial path, we were able to learn the importance of time constraints and hardware limitations from it. Therefore, we were able to fulfill the core objectives in this project while learning and adapting through challenges as they surfaced.

Discussion Section Image

Difficulties

There are several challenges we faced during this project, which are separated into three categories below:

  • Computer Vision: Ball detection using HSV can be inconsistent and inaccurate due to noisy background, fast motion of the ball, and ball going out of frame.
  • Trajectory Prediction: Position detection with RealSense camera limited to 30 FPS and 3 meters of accurate depth, which significantly decreases accuracy and the physical space we can work with.
  • Controller: MPC solving time took more than 1 second sometimes while the ball is only airborne for less than a second. The MPC problem setup is not perfectly fine-tuned as we were not able to fully grasp the numerical limitations of the Sawyer robotic arm. Additionally, the batch approach took longer to solve the optimization problem.
Difficulties Section Image

Future Directions

Our solution's main flaw is the limited trajectories that the ball needs to be thrown through to have our robot function correctly. Due to the way we implement our initial velocity calculation, we needed to have a consistent spot for ball throwing, and we also needed to throw the ball at a particular angle and height. Another flaw is the color thresholding, which requires some of our teammates to physically cover certain areas in the background to avoid great noise even after applying DBSCAN. If we have additional time and budget, we would consider using a higher-end depth camera that provides deeper and more detailed depth information as well as higher FPS. In addition, we will try exploring different object detection algorithms that are less susceptible to noise, such as training a model for our particular application.

Improvement Section Image