Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Who has the camera working? (http://www.chiefdelphi.com/forums/showthread.php?t=43247)

cvbritton 03-02-2006 18:32

Who has the camera working?
 
If your team has the camera working, could you please post here? It would be greatly appreciated. Our team is curious to know if everyone else is having difficulties as well.

:)

CarpeDiem 03-02-2006 19:10

Re: Who has the camera working?
 
we have ours working, what is ur problem

Safarley2901 03-02-2006 19:14

Re: Who has the camera working?
 
Quote:

Originally Posted by cvbritton
If your team has the camera working, could you please post here? It would be greatly appreciated. Our team is curious to know if everyone else is having difficulties as well.

:)

We Had ours working the 1st week. Post any problems you have and we'll try and help.

Team 808,

6600gt 03-02-2006 19:46

Re: Who has the camera working?
 
We got ours working using the Kevin Watson code with minor tweeks.

Eldarion 03-02-2006 21:27

Re: Who has the camera working?
 
Ours is working perfectly. We did it the "hard way" without Kevin's code. ;)

Post any problems you are having and we will try to answer them!

scitobor 617 03-02-2006 21:56

Re: Who has the camera working?
 
Got it working and even have had an old robot driving toward the green light by the second week.

Donut 03-02-2006 22:56

Re: Who has the camera working?
 
Camera works fine.

We just have to develop the shooting algorithm based from it now...

Gili 04-02-2006 07:09

Re: Who has the camera working?
 
we also had problems with the camera, we couldn't make it track green with Kevin's code, so we developed our own code for the camera (tracking and searching).
feel free to download our code here or ask questions about it.
good luck! :)

Beeman836 04-02-2006 07:52

Re: Who has the camera working?
 
we have the camera "working", we are getting output in the IFI_Loader window for pan and tilt, but the camera itslef is not moving.
:(

Ryan M. 04-02-2006 08:09

Re: Who has the camera working?
 
Quote:

Originally Posted by Beeman836
we have the camera "working", we are getting output in the IFI_Loader window for pan and tilt, but the camera itslef is not moving.
:(

Make sure that you have the servos hooked up to the correct PWMs and that you have a (fully charged) backup battery attached to the robot controller. :)

Ryan O 04-02-2006 11:08

Re: Who has the camera working?
 
I got it working! Kevin coded it to tilt the wrong way when it found the target. To fix this go to tracking.c. In the servo track function, find the y-axis/ tilt tracking code. Where it assigns the tilt error, multiply the whoole subtraction problem by -1. THen go down and find the two places where it assigns 1 or -1 to the step in a division erro occurs and reverse them. That should fix the problem.

Denz 04-02-2006 11:32

Re: Who has the camera working?
 
Or go to tracking.h

// If your camera suddenly moves away from the target once
// it finds it, you'll need to change the sign on one or
// both of these values.
#define PAN_ROTATION_SIGN_DEFAULT +1
#define TILT_ROTATION_SIGN_DEFAULT +1

change the value there. lol It's alot easier :rolleyes:

Marcel 04-02-2006 11:40

Re: Who has the camera working?
 
Ours is working but the last time I checked it would follow our faces rather than the green light we had. Probably because the green light was iluminated on our faces but whatever as long as it follows green right?

FlyingDutchman 04-02-2006 11:47

Re: Who has the camera working?
 
we got our camera working and we our using pixels to tell how far away our robot is from the goal and how much force it will need to hopefully go in

cmurdoch 04-02-2006 13:32

Re: Who has the camera working?
 
Our camera works but we're still playing with the code to make it track the way we want it to.

Zyik 04-02-2006 13:33

Re: Who has the camera working?
 
Ours will now follow the green light very consistantly, including when it is about 8 feet in the air and its far away from it.

mallot1243 04-02-2006 15:29

Re: Who has the camera working?
 
4 weeks and we finally got it to work, bad converter
now just the rest of the robot

Windward 04-02-2006 16:25

Re: Who has the camera working?
 
Quote:

Originally Posted by cmurdoch
Our camera works but we're still playing with the code to make it track the way we want it to.

123, we are still in the tweaking/troubleshooting phase.

Bcahn836 04-02-2006 16:31

Re: Who has the camera working?
 
Team 836's camera is up and running finally. :D

bbehnke 04-02-2006 16:33

Re: Who has the camera working?
 
today was the first day we had it on the thing that aimed the shooter and i dont think we have any problems (knock on wood) so far just a couple of minor adjustments to do to it. in like last year where we fried it the first time we put it on :D

Donut 05-02-2006 00:42

Re: Who has the camera working?
 
To anyone teams having problems with the camera "running away" from the target, it's because Kevin wrote his code for the way the camera is supposed to be mounted, the instructions the kit gave us had us mount it upside down. There are a couple of other threads on the issue.

The camera has no difficulties, and I already have a rough layout of how to move a rotator and adjust speed using it.

Cuog 05-02-2006 19:04

Re: Who has the camera working?
 
Team 422 has a working camera and electronics board still waiting on a robot tho

bear24rw 05-02-2006 19:07

Re: Who has the camera working?
 
team 11 has the camera working on an old robot were a turret auto centers itself to the light, we also have the camera working in autonomous mode :)

chmp09 14-01-2007 11:29

Re: Who has the camera working?
 
Kevin Watson makes everything easy. Just go to his site and download the bells and whistles code for the camera. You may have to adjust the angles in the code for the servos, but it tracks really nice if built correctly.

teh_pwnerer795 15-01-2007 19:16

Re: Who has the camera working?
 
1392... standing good.. working.. tracking.. cant complain

agmlego 15-01-2007 22:28

Re: Who has the camera working?
 
I have ours tracking very nicely albeit slowly with an EDUbot chassis. Smooth and steady. Gotta work on the power curves for the drive motors so it goes faster than (literally) a foot a minute.

804_twidget1 16-01-2007 19:45

Re: Who has the camera working?
 
We are still working on the camera but are getting nothing but errors. we are unable to find the file that allows the camera to read the serial port. if any one out there understands why it's not working, let me know.

sniggel 18-01-2007 15:29

Re: Who has the camera working?
 
we also had problems with the camera, we couldn't make it track green with Kevin's code, so we developed our own code for the camera (tracking and searching).
feel free to download our code here or ask questions about it.
good luck!
... the link for he code doesnt work,, can you check it or give us another link

Bomberofdoom 18-01-2007 15:52

Re: Who has the camera working?
 
:( Not working yet at 2230 too. I connected the servos to PWM 01 and 02, connected PWM08 to the top 3 pin next to the power switch on the camera and took a pwm cable to connect to that small elctronic board that is to be plugged in the 4 pin area and connected it to the lower 3 pin on the camera, but nothing came up on the IFI screen.

phoenixRae 18-01-2007 16:58

Re: Who has the camera working?
 
Team 581 here - got the camera up and running by the end of the first week, but was initially stumped as to why Kevin Watson's scanning algorithm wasn't working for us properly. From what we could see, the camera started out at an orgin way left of what it should be, and the 5 step pan reflected that bias. Turns out that the guy who assembled the camera (definitely wasn't me... yeah... *cough*) forgot that the servo plates need to be engaged to the servo in such a way that the PWM values for facing straight forward (which are 124 for pan, 144 for tilt, if memory serves) actually translate to facing straight forward. In case anyone else's run into this problem, here's how we fixed it:

1.) Before bolting the camera board onto the pan-tilt assembly, connect up the servos in the configuration described by Kevin Watson's default code (Pan in PWM01, Tilt in PWM02). You won't be needing the actual camera to do this, and since we'll be unscrewing a few things in the process, it's safer for the camera not to be involved.

2.) Follow Mr. Watson's instructions on installing and loading his code onto your 2007 Robot Controller, and tether your robot to its OI. Make sure your PWM cables aren't tangled with the pan-tilt assembly, then fire 'er up.

3.) What you'll see the camera do may vary depending on how your plates are aligned already, but if you're using Mr. Watson's code, it should move to its defined center, then repeat a path through 5 pan positions:

1 - Far left (PWM: 0)
2 - Left (PWM: 62)
3 - Center (PWM: 124) *This supposed to be the center of the camera's pan motion; it may not be at this time.*
4 - Right (PWM: 186)
5 - Far Right (PWM: 248)

What you want to do is unplug the pan servo from the Robot Controller at position 3 and turn off the robot. Now, unscrew the servo plate on the pan servo (without turning the servo), take it off the gear-shaped servo shaft, and align the camera so that it's facing forward. Put the plate back onto the servo shaft (again, without turning the servo), and screw it back on.

4.) The tilt servo runs through 3 positions, the second of which is supposed to be parallel with the ground. Repeat step 3 for the tilt servo (unplugging it at that second position), and you're done! =)

Thanks for reading my incredibly long post, hope it's of help to someone suffering from the same problem.

sniggel 19-01-2007 14:00

Re: Who has the camera working?
 
We had the camera working yesterday, however now the camera seems to recognize the target but it doesnt seem to be sending any data. No changes to the code or hardware have been made. Help in any way would be appreciated. Thanks in advance.

paulcd2000 19-01-2007 20:10

Re: Who has the camera working?
 
I have it working, but i was just wondering...
Did everyone else have to change the, "PAN_ROTATION_SIGN_DEFAULT" and "TILT_ROTATION_SIGN_DEFAULT" cuz we had to change both. check those if ur having problems

slloyd 20-01-2007 20:53

Re: Who has the camera working?
 
we noticed that when the camera is tracking around the PWM cable would come lose and then "no data" would appear. took a while before we realized this.

i think we should tape it in place or something.

slloyd

slloyd 20-01-2007 20:55

Re: Who has the camera working?
 
we didn't need to chanage anything in the code. using kevin's 2007 code, version 2.1 (just released).

but, i found the camera was turning AWAY from the green light... but since i read kevin's FAQ ahead of time i knew he had the answer already. within 5 minutes the camera was tracking feverishly!

slloyd

synth3tk 21-01-2007 00:15

How We Did It (Sorta)
 
Team 964 is proud to announce that after a week of trial, error, and frustration that our camera works! How we did it exactly, I don't know. Me and Devin sorta played around with the coding for a bit, then resorted to the CMUCam2_Workbook, [sarcasm]the last place you should look.[/sarcasm] As I said earlier, we wouldn't be able to tell you the exact steps to save our lives, but I can give you the general steps that we used. {Note: MPLab and LabView was used}
  • Added include lines for all the header files into user_routines.h
  • Went through the CMUCam2 Workbook and followed the steps to calibrate it (using YcRcb)
  • Fine tuned the tracking.c code until it moved the way we wanted it
Also, it took a while for it to send data to the terminal, which is an integral part of calibrating it, needless to say.

Quote:

Originally Posted by paulcd2000 (Post 560737)
I have it working, but i was just wondering...
Did everyone else have to change the, "PAN_ROTATION_SIGN_DEFAULT" and "TILT_ROTATION_SIGN_DEFAULT" cuz we had to change both. check those if ur having problems

Yes! Devin changed that during Friday's build time, but I wasn't there when he did it so I'm not sure of the values used. Pretty sure it was -1 and -1 or something.

Quote:

Originally Posted by slloyd (Post 561465)
we noticed that when the camera is tracking around the PWM cable would come lose and then "no data" would appear. took a while before we realized this.

i think we should tape it in place or something.

slloyd

Yeah, we were having this same problem. It was getting on my last nerve everytime it'd cut off data and we realized that problem.

skillinp 25-01-2007 20:11

Re: Who has the camera working?
 
Quote:

Originally Posted by FlyingDutchman (Post 446191)
we got our camera working and we our using pixels to tell how far away our robot is from the goal and how much force it will need to hopefully go in

Will that still work when the lights are only partially facing the sides, in other words, could it confuse being far away with the light at some odd angle?

Idaman323 26-01-2007 18:07

Re: Who has the camera working?
 
Glad everyone has it working... ! So far, this year, I have not figured it out. Last year I tried to get it working and it failed me. What happens after it tracks the light? We need it to move the drive motors to turn in the right direction...

Tom Bottiglieri 26-01-2007 18:09

Re: Who has the camera working?
 
We just capped the vision tetra.

wingnut1705 27-01-2007 13:33

Re: Who has the camera working?
 
We got our camera working with the Kevin Watson code.

jgannon 27-01-2007 13:49

Re: Who has the camera working?
 
Quote:

Originally Posted by paulcd2000 (Post 560737)
I have it working, but i was just wondering...
Did everyone else have to change the, "PAN_ROTATION_SIGN_DEFAULT" and "TILT_ROTATION_SIGN_DEFAULT" cuz we had to change both. check those if ur having problems

If anybody is having this problem, it's because your camera board is upside down. You probably have it set the way that the manual shows, whereas Kevin's code is optimized to work the other way, so the axis of tilt rotation passes through the lens of the camera. I think the way Kevin has it makes more sense in this application, but you can just switch the sign on both of those parameters if you'd rather leave the hardware alone.

bronxbomber92 27-01-2007 13:53

Re: Who has the camera working?
 
Got the camera working today :)
Just, I can'tfigure out to make it move (forward) once it is targeted on the light...

abrockhoff 27-01-2007 21:24

Re: Who has the camera working?
 
Ours is working, but we're still playing around with the virtual window function and 2 lights to get our robot to the rack as fast as possible.

Donut 28-01-2007 11:25

Re: Who has the camera working?
 
Quote:

Originally Posted by Tom Bottiglieri (Post 565936)
We just capped the vision tetra.

How did you get 2 years behind schedule on your camera? :)

We uploaded the code on last year's camera, no problems at all. As long as the new camera is wired properly it shouldn't have any problems either.

Now we just have to figure out what we want it to tell us.

Mib 28-01-2007 13:46

Re: Who has the camera working?
 
We have ours set up, tracking lights, and giving feedback through the terminal.

Right now, we're working on coding in trig functions in order to do the autonomous modes.


All times are GMT -5. The time now is 00:52.

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