|
Re: Trackballs and CMUcam
Dan,
Nice to meet you on CD. Actually that was not a pot, it's an Ultra Sonic sensor. The sensor looks up at the over pass. After we get so close to the over pass the CMU loses sight of the ball because the tilt servo and the bottom of the ball is too dark. So we roll through the over pass until the ultra sonic senses it. Once it does, it makes the robot change states in the software. Classic state logic.
We don't have a panning servo. We never have. We lock the camera X to the robot base. The FOV (field of view) for the camera is good enough to see the entire over pass with a fixed position X (panning). So instead of using a panning servo, we create an error variable from the pixels from the X value. Then make the robot drive to the error. The center of the the "X" FOV is 80 pixels (160 x 240). So if the camera sees the centroid or center of mass in the ball say to the left of the center of X, then it will report an X pixel of 40. The error will be 40 (80 - 40). When then take this error of 40, and scale it into a percent based PWM command and correct the entire robot base to drive to the center of the mass. When the robot turns towards the error, the error from the camera will get less, and less, and the percent based scaled error of "X" will decrease until the ball mass is at 80 pixels, which is 0 error. We put in about 5 pixel dead band, so the camera can report 75 to 85 pixels and that's good enough.
We tried a FALCON vision system, which required a light. We bought an automotive fog light and made a reflector for it. But we changed back to the CMU camera and the lighting was "ok" as is. I personally have a light meter. At our practice field, we have 400 LUX reading on the light meter on the face of the ball we are trying to see. We went to a Muncie practice on Sunday before ship day, and their field was 170 LUX, our camera would not see the ball, so we dropped some setting in the camera and was able to drive under the ball once again. We plan on bringing our light meter to Boilermaker and measure the light from arena so we understand it.
Hope that helps.
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here: Repository
Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369
|