100 likes | 165 Views
Final Project. Web Design. Final Project. Your robot will be placed in a room with the red cone. Your robot will need to find the cone in the room and run into it. Extra credit if your stops when it hits the cone .
E N D
Final Project Web Design
Final Project • Your robot will be placed in a room with the red cone. • Your robot will need to find the cone in the room and run into it. • Extra credit if your stops when it hits the cone. • Final Projects must be completed by the end of class on Tuesday May 31st! Project demonstrations will be done June 1st and 2nd.
Requirements • You program must have at least 3 functions: • Find the cone. • Move to the cone. • Main function to control it all. • Everyone must work on some part of the project. At the end of the project each team member must submit a paragraph explaining their contribution to the program to get any credit.
Requirements • Comments! Each process must be commented as to its function and purpose. • Your robot will need to ignore the green ball and the orange cones. • Extra Credit if your robot can recover form bring thrown off course (i.e. can it find the cone again?)
Stalled Robot • Scribbler has a way of sensing that it is stalled when trying to move. This is done by using the Myro function getStall: • getStall() Returns True if the robot has stalled, False otherwise. • You can use this to detect that the robot has stalled and even use it as a condition in a loop to control behavior. For example: while not getStall(): <do something>
Is the Object in the Picture? • You will need to determine this. • Analyze each pixel in the picture. • Count the number of pixels that you think are the red cone. • If the count is greater than a threshold you have found the item. • You need to decide the threshold and how to decide if a pixel is part of the cone. What are R, G, B values that you think identify the cone? Can you use 1 of R, G, B or 2?
Where in the picture is the object? • Remember you care where the item is from side to side (not top to bottom). • X pixels are numbered from 0 to 255 (left to right) • Divide the image into 3 parts: • Left third 0 - 85 • Middle 85 – 170 • Right 170 – 255 • If you average the x values of the cone in the picture you will know roughly where in the picture the cone is.