Hello VEX fans,
Posted this on Chief Delphi and heard nada. I’d really like to get this cmucam working on VEX. The younger students in our program tend to think of VEX more as a toy. Its not, but we can use that natural curiosity to get them to learn the fundamentals of the robotics which makes them a lot smarter as the years go by. Any assistance you could provide would be greatly appreciated. We’re not particularly strong with camera tracking in general and I really hoped to spark some interest in our younger students this year so that we can get better at using this kind of sensor.
Regards,
KHall
During this build season I came across a cmucam2 revA which I believe to be from the 2007 season. Now that build season is over I thought it would be an interesting home project to see if we can get it working on a VEX controller so we can use it to teach the basics of cameras to our younger students.
That was about a week ago… I’ve collected a lot of information and software since then including several example programs for Brad Miller’s WPILIB and Kevin Watson’s cmucam code.
I know the camera works just fine since using the Java applet CMUcamGUI2_fe I can track colors reliably. Further I know that both Brad & Kevin’s code sucessfully initializes and starts the camera tracking (from LEDs and Brad’s easy to use SetCameraDebugMode(1) function).
But after that the results are completely consistant. The T-type packets appear to be sent but when you do printfs for the tracking variables you always get zeros.
Its interesting that with Kevin’s code (at startup) the first output is ‘no camera data’. It always happens once at startup, and from then on it just outputs 'Searching…". If you unplug the serial connection, Kevin’s code just streams ‘no camera data’. That makes me think that the camera is sending the data, but the VEX has something just a little different that causes the data to be ‘lost’. ( And I double checked my pointer logic many times. The variables are really empty. )
So after reading and trying everything that I can think of, and must admit I’m stumped. I’ve been using MPLAB and WPILIB for programming these VEX machines for quite a while now and it is, generally speaking, rock-solid.
So if you have any suggestions, or know something about the how the VEX CPU might be different, please pass it along. It would sure be nice to make use of this camera with the younger students – rather than just have this equipment and code sitting on a shelf collecting dust.
Thank-you,
KHall, Mentor
Team 2171
Crown Point RoboDogs