Log in

View Full Version : 2 CMU Cameras... AT ONCE!


Michael Corsetto
26-01-2007, 02:01
Today our programmers achieved something that I have not seen anyone do before. Get 2 CMU cameras up and running off of one robot controller. We recorded a bit of footage of them in action and I've uploaded videos in both YouTube and Google Video flavors.

http://www.youtube.com/watch?v=kqUAtuZEypM
http://video.google.com/videoplay?docid=-4621306641915286575

Enjoy!
Mike C.

PS. We will be replacing the board on the 2006 CMU camera in order to be in compliance with the rules. We just haven't gotten around to it yet.

Arkorobotics
26-01-2007, 02:18
Woah! Now that is some nice stereo vision. It's a great idea to figure out your position relative to the rack. Autonomous mode would rock with this.

SPARKY1688
26-01-2007, 02:19
First of all congrats on a job well done. How will two cameras help you out doesnt the camera(s) send a signal to the motor to approach the target? If your on the field and the cameras seek out two different sources , then what? Sorry if the questions seem stupid, its just out of curiosity.
marko

Tom Bottiglieri
26-01-2007, 02:32
"Yeah I'm taking a video of it to put on Chief Delphi..." - priceless...

This seems pretty cool. I'm not sure how useful it will be, but I'd love for you to prove me wrong.

Michael Corsetto
26-01-2007, 02:41
First of all congrats on a job well done. How will two cameras help you out doesnt the camera(s) send a signal to the motor to approach the target? If your on the field and the cameras seek out two different sources , then what? Sorry if the questions seem stupid, its just out of curiosity.
marko

We plan on using the two cameras to give us automatic scoring on not only the 4 columns underneath the lights, but allow us to even ourselves out between the two lights so we can easily score on the 4 other columns. We figured that if we can give the programmers enough time, a smooth autonomous scorer will be more effective than a manually controlled scorer.

Mike C.

chris31
26-01-2007, 07:00
Theres alot of cool things to do with 2 cameras. Your cameras both run the same search algorithm. If you have one search the left and one search the right you will effectivly cover more area and they wount both be searching in the same area.

Tom Bottiglieri
26-01-2007, 10:16
Theres alot of cool things to do with 2 cameras. Your cameras both run the same search algorithm. If you have one search the left and one search the right you will effectivly cover more area and they wount both be searching in the same area.
But for the half second you save, is it worth the extra weight, processor load, and development time?

jgannon
26-01-2007, 10:20
But for the half second you save, is it worth the extra weight, processor load, and development time?
Sounds like you'll find out in March. ;)

Validius
26-01-2007, 10:21
There is only one serial port on the controller (aside from the programming port). How did you get both cameras to interface?

jgannon
26-01-2007, 10:36
There is only one serial port on the controller (aside from the programming port). How did you get both cameras to interface?
I can't speak for certain, but I'm almost certain they did it by using the programming port. When you're not programming, it's just a regular UART.

MikeDubreuil
26-01-2007, 11:02
I'm not sure how useful it will be, but I'd love for you to prove me wrong.Very useful in winning a control system award :D

Validius
26-01-2007, 11:10
I can't speak for certain, but I'm almost certain they did it by using the programming port. When you're not programming, it's just a regular UART.

Yup, that must be it.

At one point i thought it would be cool to make a scriptng API that used te programming port as a console of sorts. I abandoned the idea wen i saw how much of a pain it was to read/write to the EEPROM.

jgannon
26-01-2007, 11:17
At one point i thought it would be cool to make a scriptng API that used te programming port as a console of sorts. I abandoned the idea wen i saw how much of a pain it was to read/write to the EEPROM.
You might want to check out the "bells and whistles" version of Kevin Watson's camera code. He does exactly what you describe (prints to the terminal, takes input, stores new parameters to EEPROM), and from the looks of it, it's not all that complex.

sonofdad123
26-01-2007, 11:32
holy moly that's incredible! did you alter the default code to make the cameras pan/tilt so smoothly?

chris31
26-01-2007, 20:13
But for the half second you save, is it worth the extra weight, processor load, and development time?

Weight? The pan tilt assembly is already there. If they have two cameras working now I think they have dedicated people to development. I could be wrong. The processor load wouldnt be to much. But it also depends on it they are running alot of other sensors where that might be an issue. I guess we will have to wait and see what they do.

Mike Starke
26-01-2007, 20:22
Nice work guys!
I like!


It'd be sweet to get both cameras, one to track one target, and the other to track another, and place a tube in one of the rows where the light box isn't. Can't wait to see it in action!

Cody Carey
26-01-2007, 20:50
While the dual cameras are sweet and everything, I can't help but wonder what the music playing in the back of the video is...

Any Ideas :D?

Ben Englert
27-01-2007, 19:24
How difficult would you say it was to write code that used two cameras at once?

I'm currently trying to get the RC to talk to a single camera via the program port using Kevin's serial_ports code... no luck so far.

Kevin Watson
27-01-2007, 19:37
I'm currently trying to get the RC to talk to a single camera via the program port using Kevin's serial_ports code... no luck so far.The port is specified as the first option in camera.h. Other than building a suitable cable, that's all you have to do.

-Kevin

DanDon
27-01-2007, 19:38
How difficult would you say it was to write code that used two cameras at once?

I'm currently trying to get the RC to talk to a single camera via the program port using Kevin's serial_ports code... no luck so far.

Did you define the correct serial port in camera.h? And comment out the other one?

And a very important question: Are you using a null-modem cable?

Ben Englert
27-01-2007, 19:41
Did you define the correct serial port in camera.h? And comment out the other one?

And a very important question: Are you using a null-modem cable?

I am using a male to male DB9 cable... I'm fairly certain it's straight-through, is there a special pinout neccesary?

DanDon
27-01-2007, 19:47
You can find the pinout for a null modem cable here (http://en.wikipedia.org/wiki/Null_modem). Basically, all the pins dealing with transmitting on one side are the pins dealing with receiving on the other side (i.e. The Tx and Rx pins are crossed), allowing the ports to talk to each other.

Ben Englert
27-01-2007, 20:53
Thanks for the tip... works much better now. That was the easy part, now to modify the code to track on two cameras.

Brad Voracek
28-01-2007, 00:30
How quickly does that wear out your backup battery?

I want the charger from the main battery for one camera, I can't even imagine the worry about battery power with two...

teh_pwnerer795
28-01-2007, 01:15
Congrats:) cant wait to see it:)

teh_pwnerer795
28-01-2007, 01:24
How quickly does that wear out your backup battery?

I want the charger from the main battery for one camera, I can't even imagine the worry about battery power with two...

1392's battery inst that bad, i can the camera for 2-3 days for only a couple of hours each day until battery is gone...

Ben Englert
28-01-2007, 20:38
Happy to report that I have two cameras tracking independently as of about 5pm this evening :-)

Sean Marks
28-01-2007, 21:09
Nice Job. Fun to watch. hope it helps somehow.

teh_pwnerer795
30-01-2007, 02:20
now is this legal?.... if so do they (cameras) have to be the new 2007 models?

Michael Corsetto
30-01-2007, 03:53
Correct me if I'm wrong, but I believe the only part of the camera that can't be used from the 2006 KOP is the "motherboard", the thing the the CMU camera plugs into on the module (forgive me for not using correct terms, i am a lowly mechanical team member :p ) We ordered an entire second camera, with another mount, just to have a spare lying around incase things go wrong.

Mike C.

teh_pwnerer795
30-01-2007, 16:13
proud to say that 1392 has also succesfully intergrated two cameras this year:) ... only we need to buy another legal camera:(

kitscuzz
30-01-2007, 17:27
Team 1389, we got it working too. But does anyone know what rule actually says we can't use last year's Camera? If we aren't using the pwm outputs to control the servos, then we aren't really using any functionality that isn't available on the new motherboard.

Any ideas?

****EDIT****
After doing some checking, I realized that rule R28 pretty much directly reads that you can't use the old boards. Are there any teams who don't plan on using there camera this year? We really don't have budget for a second camera, and we've already got some pretty good ideas on how to make autonomous work really quickly with two cameras. Thanks in advanced!