Results and Conclusion

Results

Our final results are as follows:

  • System can solve arbitrary paths through our maze in 8-10 seconds

    • This is compared to a 3+ minute time achieved with our first working version of the vision and control systems, and a ~7s time for humans to solve the maze

  • Difficult maze features can be navigated consistently (e.g., where walls cannot be used to direct the ball, or where there is a long runway for the ball to gain velocity)

  • System can solve the maze 95%+ of the time (failures are rare and are typically due to abnormal lighting conditions leading to errors in maze reconstruction, but can usually be overcome when the vision system reconstructs and resolves the maze)

Find several videos of our robot solving the maze below! The videos at left show the sawyer solving two different maze paths, and the video at right shows the sawyer solving the maze with ball position, desired position, and end position illustrated on top.

20221206_194330.mp4
20221206_193436.mp4
IMG_3619.MOV

Conclusion

How well did our finished solution meet our design criteria?

Our final solution met all high-level design criteria that we established, with the exception of our stretch goal to navigate the maze with arbitrary wall contact.

Sub-criteria listed on the design page were all met to achieve this result.

Difficulties we encountered

CV / Path Finder

  • Lighting variations and shiny surfaces distort thresholding parameters, and it requires tuning when it does not work.

  • Shadows and camera angles at the edge of the maze led the system to think the ball was inside the boundary.
    Solution: incremental erosion to distinguish the ball and the maze.

  • Path-finding was computationally expensive.
    S
    olution: implement A* and only update the path at time intervals. Find target position by comparing ball position to path node positions.


Planner & Controller

  • Slow sampling time: Makes every fancy control algorithm inapplicable

  • Mapping pixel space >> world space >> theta space was very confusing

  • P control responses show overshoots, so we needed to add the D term.
    However,
    D was noisy, so we experimented with moving averages for the D term



Ideas for improvement & future work

  • Current system needs entire maze to be in view of camera, we could build a system where the camera pans and constructs a map.

  • Current system relies heavily on thresholding and is vulnerable to light variations, we could experiment with canny edge detection as a means of ball and maze boundary recognition.

  • If we can increase the camera sampling frequency, we could implement a more advanced, model-based control algorithm

  • We could try and make our system navigate multiple balls through the maze. To do so, we could experiment with the following approaches:

    1. Return an error vector to the controller that is the average error of each ball to its next target position, constrained so that the error vector can never move either ball away from its next target position. In the case where this is impossible, randomly shake the maze until it is possible.

    2. Move one ball through the maze first, and then when moving the second ball through the maze, constrain the problem so that the resulting target position of the second ball is always within a certain radius of the end position.