Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Wiring two cameras (http://www.chiefdelphi.com/forums/showthread.php?t=33037)

Karma 18-01-2005 21:18

Wiring two cameras
 
The newest team update stated that we could use two cameras, our team is considering a use for both of the cameras. None of our Electronics team or other members can figure out how to wire the two cameras though. So how would you wire two cameras up to the TTL Serial Port on the RC?

Dave Flowerday 18-01-2005 21:21

Re: Wiring two cameras
 
Quote:

Originally Posted by Karma
So how would you wire two cameras up to the TTL Serial Port on the RC?

You'll probably want to hook one camera to the TTL port and the other to the programming port. It will be very difficult to multiplex the TTL port for two cameras, requiring both electronics to switch between the cameras AND a good deal of software development to deal with both. You can't talk to two cameras at the same time over one serial port.

KVermilion 18-01-2005 21:22

Re: Wiring two cameras
 
Are you sure they said you can? I mean, I remember a team update that said you can't...

Nevermind... thats odd...

kjohnson 18-01-2005 21:36

Re: Wiring two cameras
 
Quote:

Originally Posted by KVermilion
Are you sure they said you can? I mean, I remember a team update that said you can't...

It was changed in Team Update #3.
http://www2.usfirst.org/2005comp/Upd..._Update_03.pdf

Karma 18-01-2005 21:38

Re: Wiring two cameras
 
Quote:

Originally Posted by KVermilion
Are you sure they said you can? I mean, I remember a team update that said you can't...

http://www2.usfirst.org/2005comp/Upd..._Update_03.pdf

Rule # 1007, 'You may use a 2nd vision camera with your robot.'

I think that this rule being in place, there should be a semi-simplistic solution to have two cameras. I appreciate your help Dave, but I still think there might be another way to wire them both.

phrontist 18-01-2005 21:43

Re: Wiring two cameras
 
We get TWO?!

kjohnson 18-01-2005 21:50

Re: Wiring two cameras
 
Quote:

Originally Posted by phrontist
We get TWO?!

No, you get one in the Kit of Parts, but FIRST is allowing you to use two on the robot. You would have to order another one from Innovation First at http://www.ifirobotics.com

KVermilion 18-01-2005 22:12

Re: Wiring two cameras
 
Quote:

Originally Posted by nukemknight

Quote:

Originally Posted by Karma
http://www2.usfirst.org/2005comp/Upd..._Update_03.pdf

Rule # 1007, 'You may use a 2nd vision camera with your robot.'

I think that this rule being in place, there should be a semi-simplistic solution to have two cameras. I appreciate your help Dave, but I still think there might be another way to wire them both.

I know... read the whole post.... :rolleyes:

dlavery 18-01-2005 23:40

Re: Wiring two cameras
 
To the first team that successfully enables two CMUcamIIs on their robot and uses the PIC microprocessor in the IFI robot controller to compute the stereo correlation from the two camera images to determine range to the designated target, within the time limits of the autonomous period, I will personally award six dozen Krispy Kreme donuts.

Yes, it is physically and electrically possible to connect multiple CMUcams to the RC. But once you do, what are you going to do with the data?

-dave

(OK, now that I have said this, just watch someone like Kevin Watson have a working solution by this Friday... :yikes: )

NoodleKnight 18-01-2005 23:46

Re: Wiring two cameras
 
Quote:

Originally Posted by dlavery
To the first team that successfully enables two CMUcamIIs on their robot and uses the PIC microprocessor in the IFI robot controller to compute the stereo correlation from the two camera images to determine range to the designated target, within the time limits of the autonomous period, I will personally award six dozen Krispy Kreme donuts.

Yes, it is physically and electrically possible to connect multiple CMUcams to the RC. But once you do, what are you going to do with the data?

-dave

(OK, now that I have said this, just watch someone like Kevin Watson have a working solution by this Friday... :yikes: )

Me any my friend used two old CMU cameras (the current release in the summer of 2003) to do that, although the Acroname GP boards weren't powerful enough to do it very well. In short we had our trikebot find a target, aim, and fire a paintball gun at it (all done on a 2d plane though, 3d wasn't possible, processor too slow). The theory sounded cool, never did get it to perfectly work though... But hey, with the new CMUII cams and PIC processors, shouldn't be too hard :D :D :D.

Kevin Watson 19-01-2005 00:24

Re: Wiring two cameras
 
Quote:

Originally Posted by dlavery
To the first team that successfully enables two CMUcamIIs on their robot and uses the PIC microprocessor in the IFI robot controller to compute the stereo correlation from the two camera images to determine range to the designated target, within the time limits of the autonomous period, I will personally award six dozen Krispy Kreme donuts.

Yes, it is physically and electrically possible to connect multiple CMUcams to the RC. But once you do, what are you going to do with the data?

-dave

(OK, now that I have said this, just watch someone like Kevin Watson have a working solution by this Friday... :yikes: )

Dave,

I just happen to be working on getting the camera code to work with my serial port driver. And now that you mention it, it wouldn't be too hard to have a second instance of the camera code running... Does your offer include those really tasty glazed, raspberry filled gems?

-Kevin

dlavery 19-01-2005 00:43

Re: Wiring two cameras
 
Quote:

Originally Posted by Kevin Watson
Dave,

I just happen to be working on getting the camera code to work with my serial port driver. And now that you mention it, it wouldn't be too hard to have a second instance of the camera code running... Does your offer include those really tasty glazed, raspberry filled gems?

-Kevin

I knew almost as fast as I typed that message that it would be a mistake. :) Yes, if you get a stereo correlation algorithm working on the PIC with two CMUcamIIs that runs fast enough to provide a solution within the 15 seconds of the autonomous period, then the award will include 72 delectable morsels of your choice. And I already know where all the Krispy Kreme stores in LA are located (actually, the Burbank store may be closer).

OK, so is anyone else going to give Kevin a challenge for the donuts?

-dave

Stephen Kowski 19-01-2005 00:50

Re: Wiring two cameras
 
program our robot and you will recieve two dozen doughnuts.....that'd be cool just to say NASA programmed our robot ;)

jgannon 19-01-2005 01:39

Re: Wiring two cameras
 
Quote:

Originally Posted by dlavery
OK, so is anyone else going to give Kevin a challenge for the donuts?

I'll tell you what, Dave. Mail me another CMU cam, and I'll gladly demonstrate two-camera code for you in Atlanta. :p

Conceptually, it's not that difficult. Get them both operational (with a little help from Kevin), and mount them on opposite corners of the front your robot. You know the width of your robot (likely 28"), and you can get the two angles from the values of the pan servos. You have angle-side-angle, and there's only one solution to the triangle. Now you know how far away you are. Pivot until the two base angles are congruent, and charge forward until you're the proper distance from the vision tetra. Use the same theory with the yellow triangle to the goal. It's very doable, and I'd love to pull it off. I can't think of a more incredible nerd feat attainable at this age than to meet Dave Lavery's personal challenge. ;)

That being said, I don't think my team is interested in spending $200 on 72 donuts. Thanks for the offer, though, Dave. :rolleyes:

Al Skierkiewicz 19-01-2005 07:48

Re: Wiring two cameras
 
Quote:

Originally Posted by dlavery
I knew almost as fast as I typed that message that it would be a mistake. :) Yes, if you get a stereo correlation algorithm working on the PIC with two CMUcamIIs that runs fast enough to provide a solution within the 15 seconds of the autonomous period, then the award will include 72 delectable morsels of your choice. And I already know where all the Krispy Kreme stores in LA are located (actually, the Burbank store may be closer).

OK, so is anyone else going to give Kevin a challenge for the donuts?

-dave

You know he was just waiting for someone to raise the stakes high enough! 72 is too rich for my blood, I fold.

dlavery 19-01-2005 11:14

Re: Wiring two cameras
 
Quote:

Originally Posted by jgannon
Conceptually, it's not that difficult. Get them both operational (with a little help from Kevin), and mount them on opposite corners of the front your robot. You know the width of your robot (likely 28"), and you can get the two angles from the values of the pan servos. You have angle-side-angle, and there's only one solution to the triangle. Now you know how far away you are. Pivot until the two base angles are congruent, and charge forward until you're the proper distance from the vision tetra. Use the same theory with the yellow triangle to the goal. It's very doable, and I'd love to pull it off. I can't think of a more incredible nerd feat attainable at this age than to meet Dave Lavery's personal challenge. ;)

Actually, conceptually it is not that simple. Remember, the challenge is to come up with a real stereo correlation solution, not a simple geometric one. The biggest problem is that there are multiple vision tetras out on the field. You have to compute the true correlation between the camera images to determine if both cameras are looking at the same target. Only then can you back-solve the geometry.

If I am going to give away six dozens tasty treats without allowing any for myself, I have to make sure that the challenge is really worth it! C'mon, are you all going to leave Kevin as the only contender?

-dave

Nitroxextreme 19-01-2005 13:39

Re: Wiring two cameras
 
Ummmmmmmmmmm....
I like Donuts :D

if i cant get some more funds maybe i can convince our programmer to do it
....He likes donuts too :cool:

jgannon 19-01-2005 15:41

Re: Wiring two cameras
 
Quote:

Originally Posted by dlavery
Actually, conceptually it is not that simple. Remember, the challenge is to come up with a real stereo correlation solution, not a simple geometric one. The biggest problem is that there are multiple vision tetras out on the field. You have to compute the true correlation between the camera images to determine if both cameras are looking at the same target. Only then can you back-solve the geometry.

If I am going to give away six dozens tasty treats without allowing any for myself, I have to make sure that the challenge is really worth it! C'mon, are you all going to leave Kevin as the only contender?

-dave

I think it's doable, with enough if statements. :p But, once again, my inspiration is not limited by lack of programming prowess, or lack of time, but rather lack of resources. Pity we don't have a mob boss *coughbeattycough* doing our fundraising, or I'd be all over this. ;) Enjoy the donuts, Kevin.

Kevin Watson 19-01-2005 15:49

Re: Wiring two cameras
 
Quote:

Originally Posted by dlavery
C'mon, are you all going to leave Kevin as the only contender?

Dave,

Well, I've hit a snag. After an all-night Mountain Dew and pizza-fueled programming session, I've got 19 robot controllers setup as a pipelined stereo vision processor running the 27,000 lines of MER stereo vision code that I ported to PIC C18. I have an additional 53 robot controllers running a pipelined version of the MER "GESTALT" local path planner. Everything seems to run pretty well, but my EX18-12 battery completely discharges in only 5 seconds. I asked the crack FIRST engineering staff to make an exception to rule <R46> and allow me to add the additional three batteries I need, but they wouldn't budge. I then asked if I could use a flux capacitor for power, but that didn't go over too well, either (they did say I could use it for decorative purposes, though). Anyway, can I get some partial credit for the effort? I'd be pretty happy with just two dozen.

-Kevin

ttedrow 19-01-2005 15:53

Re: Wiring two cameras
 
Quote:

Originally Posted by Kevin Watson
Dave,

I then asked if I could use a flux capacitor for power, but that didn't go over too well,
-Kevin

If you use the flux capacitor your robot will still have to drive 88mph. :ahh:

Joe Ross 20-01-2005 02:39

Re: Wiring two cameras
 
Dave, is IFI giving you a kickback? For $40 out of your own pocket you get multiple teams buying $200 cameras from IFI. That's not to mention the 60+ robot controllers that Kevin bought ;)

NoodleKnight 20-01-2005 03:18

Re: Wiring two cameras
 
I thought the flux capacitor let you travel through time, it was the plutonium that gave that 1.21 giga-watts of power (then came Mr. Fusion, which kinda makes me wonder, where did all that extra plutonium go anyways? If it never left the car, then when the train killed the delorean, wouldn't there be a big problem?).</offtopic>

Kevin, what about a wall outlet (with an adapter, of course)? 500ft extention cord? =D

Al Skierkiewicz 20-01-2005 07:49

Re: Wiring two cameras
 
Quote:

Originally Posted by Kevin Watson
Dave,
I then asked if I could use a flux capacitor for power, but that didn't go over too well, either (they did say I could use it for decorative purposes, though). Anyway, can I get some partial credit for the effort? I'd be pretty happy with just two dozen.

-Kevin

Kevin,
The flux capacitor should have been allowed under the flowchart as long as it met the single component maximum cost. I did check with Digikey and they no longer carry the line. Apparently there is a world wide shortage of material now that we are approaching a sunspot minimum. The plutonium is another problem as it does not pass the hazardous material test and the Mr. Fusion would not either for the smell of the garbage you put in. (Inspection list "Do you have anything that smells bad or can damage the carpet?") However, you could charge it up by having all the competition attendees hold hands and shuffle across the carpet. (I am not volunteering for the last person in the line, I am going to be busy that day!) See, only simple solutions, I don't drink Dew so my head is clear.

Mike Betts 20-01-2005 08:24

Re: Wiring two cameras
 
Quote:

Originally Posted by NoodleKnight
I thought the flux capacitor let you travel through time, it was the plutonium that gave that 1.21 giga-watts of power...

I believe the unit of measure was jiga-watts vice giga-watts... ;)

patTeam241 20-01-2005 09:00

Re: Wiring two cameras
 
Instead of coming up with a complex stereocamera system, could you come up with a somewhat mechanical one. If memory serves me correct, you can set up the CMUcams to drive servos to center a color on the screen. If you then read the rotation with a potentiometer, couldn't you just triangulate the distance?

jgannon 20-01-2005 10:18

Re: Wiring two cameras
 
Quote:

Originally Posted by patTeam241
Instead of coming up with a complex stereocamera system, could you come up with a somewhat mechanical one. If memory serves me correct, you can set up the CMUcams to drive servos to center a color on the screen. If you then read the rotation with a potentiometer, couldn't you just triangulate the distance?

You don't even need potentiometers... you can just read the values of the pan servos. If you scroll up a ways, I talked about how you could triangulate it, and then Dave explained why it's not quite that simple.

dlavery 20-01-2005 11:47

Re: Wiring two cameras
 
Quote:

Originally Posted by patTeam241
Instead of coming up with a complex stereocamera system, could you come up with a somewhat mechanical one. If memory serves me correct, you can set up the CMUcams to drive servos to center a color on the screen. If you then read the rotation with a potentiometer, couldn't you just triangulate the distance?

Thus we come to the nut of the problem. That would work if you could guarantee that only one object of the target color could ever be in the field of view of the cameras. But since there may be up to four vision tetras visible from any location, plus the potential for background items of the same color to be detected, you will need to deteremine the true correlation of the objects in the image to determine if the cameras are looking at the same target object.

-dave

Karma 23-01-2005 17:57

Re: Wiring two cameras
 
So in the Team Update 3, it said we could use another vision camera on our robot. Does that include any other types of cameras, such as USB? Some teams will be using Co-Processors, and thus have the capabilities to use more than two cameras, is this use even allowed? Thanks for all your help, and 955 will be the ones who win the donuts.

Mike AA 23-01-2005 18:44

Re: Wiring two cameras
 
Quote:

Originally Posted by dlavery
To the first team that successfully enables two CMUcamIIs on their robot and uses the PIC microprocessor in the IFI robot controller to compute the stereo correlation from the two camera images to determine range to the designated target, within the time limits of the autonomous period, I will personally award six dozen Krispy Kreme donuts.

Yes, it is physically and electrically possible to connect multiple CMUcams to the RC. But once you do, what are you going to do with the data?

-dave

(OK, now that I have said this, just watch someone like Kevin Watson have a working solution by this Friday... :yikes: )


And yet after... 3 days of trying I still havent gotten one camera to control anything but the servo on the camera board :( . Back to re-reading for a 20th time.


Quote:

Originally Posted by dlavery
Actually, conceptually it is not that simple. Remember, the challenge is to come up with a real stereo correlation solution, not a simple geometric one. The biggest problem is that there are multiple vision tetras out on the field. You have to compute the true correlation between the camera images to determine if both cameras are looking at the same target. Only then can you back-solve the geometry.

If I am going to give away six dozens tasty treats without allowing any for myself, I have to make sure that the challenge is really worth it! C'mon, are you all going to leave Kevin as the only contender?

-dave


I think I know how to get two involved and finding the correct tetra between the cameras but again I need to get it working with one first.

-Mike

kham 24-01-2005 23:51

Re: Wiring two cameras
 
Two cameras? Jeez, we're still trying to figure out how to implement one camera... :confused:

dez250 25-01-2005 00:15

Re: Wiring two cameras
 
Quote:

Originally Posted by Karma
So in the Team Update 3, it said we could use another vision camera on our robot. Does that include any other types of cameras, such as USB? Some teams will be using Co-Processors, and thus have the capabilities to use more than two cameras, is this use even allowed?

The second vision camera you can now use is only a second CMU-Cam2, identical to the camera that came in the 2005 FRC Kit Of Parts. To answer your other question, as of now you can only use a maximum of two CMU-Cam2 units on your 2005 FRC competition robot.

Mike Betts 25-01-2005 00:59

Re: Wiring two cameras
 
Quote:

Originally Posted by dez250
The second vision camera you can now use is only a second CMU-Cam2, identical to the camera that came in the 2005 FRC Kit Of Parts. To answer your other question, as of now you can only use a maximum of two CMU-Cam2 units on your 2005 FRC competition robot.

Are you sure? I think they are allowing the second CMU-Cam2 because it meets all flowchart and other rule criteria. In short, they could not not allow it. I think that this would be true of any camera that is less than $200 and meets all other criteria...

As far as another post above, just what would you plug a USB camera into? Then you would have to write pattern recognition software... A lot to do in less than 4 weeks....

russell 25-01-2005 01:00

Re: Wiring two cameras
 
You people are so intent on making things more complicated. Just think about it. Regardless of what you do everything is going to come down to trig in the end, and you need a total of three angles and sides in order to compute the other three. If you use two cameras then you are getting two somewhat inexact angles, along with one short side (unless you mount them one on top of the other, then you just get one long side and two inexact angles). On the other hand if you use just one camera, and mount it on top of your robot not only do you have one relatively precise angle to supplement the remaining inexact angle, you also have one long side. So not only is it less complex, it is also more accurate. And doesnt require three batteries or sixty RCs, or two cameras :ahh: . The only downside is you dont get a weeks supply of krispy kreams.

Matt Leese 25-01-2005 09:07

Re: Wiring two cameras
 
Quote:

Originally Posted by russell
You people are so intent on making things more complicated. Just think about it. Regardless of what you do everything is going to come down to trig in the end, and you need a total of three angles and sides in order to compute the other three. If you use two cameras then you are getting two somewhat inexact angles, along with one short side (unless you mount them one on top of the other, then you just get one long side and two inexact angles). On the other hand if you use just one camera, and mount it on top of your robot not only do you have one relatively precise angle to supplement the remaining inexact angle, you also have one long side. So not only is it less complex, it is also more accurate. And doesnt require three batteries or sixty RCs, or two cameras :ahh: . The only downside is you dont get a weeks supply of krispy kreams.

One camera will work great for giving you distance, but only when you're really close to the tetra. Trigonometry produces inexact values when angles are large (because the distance changes a large amount for a small change in the angle). It is much more exact when angles are small. The reason you'd want to use two cameras is that you then have two angles to use which increases your accurracy and decreases the error (if you implement it correctly).

Matt


All times are GMT -5. The time now is 16:33.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi