We will work in teams of two for the remainder of the semester.
Your team will need to leave the competition robot in the laboratory. Your second robot can remain at the place of your choosing.
Your team will need to work in the laboratory during regular laboratory hours.
You are excused from the attending in person laboratory if you can not produce green checkmark on onestop app.
There are 4 slides below
You can choose to play the game with one, two, three or four game pieces.
The game pieces will be stacked in your repository in an order determined by the course staff.
You will need to stack the game pieces in the target area in an order determined by the course staff.
On competition day, the order on the pieces in the repository and the target will be the same for all teams(but will be unknown to teams prior to the competition day).
You can store game pieces temporarily in the staging area.
You have 2 minutes to accomplish the task.
Each attempted move will give you one point. An attempted move exists if the robot has successfully picked up a game piece.
A completed sequence will give you 5 points. A sequence is completed when one game pieces reaches the target in correct order.
If you have time left at the end of your sequences, your score will be multiplied by (time left / 2 minutes)/2 +1. For 50% time left your score increases by a factor of 1.25.
If a game piece has left the game field, you can continue with the remaining game pieces.
You will need to build the game field according the specifications above.
The simplest field is just a piece of card board with the boundaries illustrated.
The most complex field includes guiding objects of any shape as long as they fit into the specified space.
You will need to build the game pieces. The game pieces need to fit into the shape specified below. They can be of any shape. A maximum of 4 game pieces can be involved. All game pieces need to have a different color. Likely 3d printed pieces will work best.
You will need to use the meArm. You will need to use a camera. The camera can be placed anywhere except inside the game field.
The Robot will need to be programmed in Python.
Your design components will likely consist of
Logic to solve the puzzle(state machine, condition diagrams etc)
Camera + Computer Vision software to detect the color of the game piece stacked on top.
Manipulator to pick up the game pieces.
You will need to use the meArm as your manipulator. You can modify the gripper but it will need to have open and close function that can be engaged by the current servo.
Your program will need to be written in python.
Camera software for the CSI and USB camera will be provided.
I recommend third party software to analyze your images off line. For example you likely will need to identifying the location and color of your game piece in the image: https://imagej.net/Raspberry_Pi
We also talked about GRIP during lecture.
The final grade does not depend on your game score, rather a minimum set of actions/capabilities are described below
Each member of the team will need to demonstrated the following function on their meArm setup:
Demonstrate that you can identify which game piece is on top of the repository stack.
Pickup one game piece and move it either to the scoring or staging area.
Your team will need to submit:
One to two page description of how you determine where to move the game pieces. The location of the game piece (x,y,z) when the release is engaged will need to be described.
Workload distribution of your team(who did what and how much).
We suggest using your team notebooks to write down and keep track of your designs and plans for this project. This will make it easier for you and for us to help you.
Participation in the competition is expected.
0) Take code you already have or know works with camera
1) Open camera
2) Set camera configuration if applicable
3) Create While Loop
4) Take Image from camera
5) Crop image to ROI
6) Convert ROI from BGR to HSV color space
7) Within ROI take other ROI and determine average Color in that ROI => {H_ROI, S_ROI, V_ROI}
8) Compare {H_ROI, S_ROI, V_ROI} to known object
Compute distance to known object in color space: e.g. sqrt( (H_ROI - H_KNOWN_OBJECT_1)^2) + (S_ROI - S_KNOWN_OBJECT_1)^2) (V_ROI - V_KNOWN_OBJECT_1)^2))
Distance is geometrical distance between two points.
The object is the one with the closest distance to the known objects.
9) Announce Color
You will need to figure out what area of your image is the cropped image
You will need to figure out t in which area you want to measure color
You will need to measure the color of known objects (you could draw rectangle on image indicating where object needs to be placed and then put text of HSV on the image for testing)