Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   How'd you do it? (http://www.chiefdelphi.com/forums/showthread.php?t=44575)

Daru 22-02-2006 15:12

How'd you do it?
 
I've been working with the camera a bit throughout the season, it really perks my interest. None of the team wants it on there except me, so I am still pushing them to let me work on it.

How do you turn your robot to the light? We don't have a turret, so we need to turn the entire robot.

I've come up with two ideas:
1)you mount the camera so it can pivot on its own with the servos, then turn the robot until the camera is straight.
2) you mount the camera stationary (no servos), and turn the entire robot until you lock on.

We're only talking Pan here, not tilt.

Which do you think is the better idea?

The only way I can see to do it the first way, is to lock on, then move the robot a little, then lock on and move a little more until the camera is straight.

The second way, you move the entire robot in a search pattern which seems a tad 'dangerous' to me, especially with my lack of programming ability :P


On our robot, it would be a lot easier to mount the camera stationary (i've already got the spot picked out), but we would then need to move the robot itself in the search pattern. This would also make the tilt adjustment VERY easy, being a simple "run a motor until it lines up" to tilt our shoot angle. This is probably what I will end up doing if no one sees a problem in it :P

Looking forward to your opinions!

~Dave
team 706

Greg Marra 22-02-2006 15:17

Re: How'd you do it?
 
We have the camera mounted stationary, and will use the relative position of the vision target in it's field of vision to aim the turret/launcher.

chris31 22-02-2006 15:50

Re: How'd you do it?
 
Number 1 is the best way to do it becuase your not going to get the accuracy you need with having your robot pivoting around all the time. Its easier and more usefull to use a pan assembly and mount that on the robot.

Daru 22-02-2006 17:39

Re: How'd you do it?
 
Perhaps, but then how would I quickly move the robot and camera at the same time to get the robot straight to the target?

The only way I can see to do this is to move a little, re-track, and repeat.

Eldarion 22-02-2006 17:41

Re: How'd you do it?
 
Just remember you are only allowed to work on software during the fix-it windows. :)

The Lucas 22-02-2006 17:43

Re: How'd you do it?
 
Mount it stationary, especially since you arent going to use tilt. The camera is going to have the target in its field of view if you are facing anywhere near direction of the target. Just get the median x (mx) near the center of the field of view and fire. The camera should only be a fine ajustment so no search routine. In auto mode just drive to about where you need to be and have the camera turn the bot a little bit to line up. Same thing in operator mode. Use an LED to indicate Target Locked and maybe a button the driver can push to do the same fine adjustment as auto mode. Just my $.02 Good Luck!

X-Istence 22-02-2006 18:48

Re: How'd you do it?
 
Mine does it rather neatly, have the driver park it in range, then have him hit a button, if the robot sees the green light, it will auto adjust to the right angle, and then the driver can start shooting. It is great!

Denz 22-02-2006 21:31

Re: How'd you do it?
 
I have it so the camera is freely mounted, can do it's search routine, when the cam locks on, the driver can press a button and have the robot line up with the target, find the distance from the target, and adjust the speed of the launchers accordingly. It works pretty well!

Rick TYler 22-02-2006 21:34

Re: How'd you do it?
 
Quote:

Originally Posted by Denz
I have it so the camera is freely mounted, can do it's search routine, when the cam locks on, the driver can press a button and have the robot line up with the target, find the distance from the target, and adjust the speed of the launchers accordingly. It works pretty well!

This is exactly how our software team designed our shooting controls. Now if the mech team had only been able to finish it in time for testing before it went into the crate... :(

Denz 22-02-2006 21:46

Re: How'd you do it?
 
Yes, the only problem is, when lining up the robot overshoots sometimes, and it kind of moves back and forth. This I am told is a PID problem, not sure what that means, and I'm a rookie programmer. Maybe if anyone has a solution, or can help me, I would really appreciate it :). But yeah, I had to make many sacrifices because of the mech section. I had originally wanted a rotating turret, and angle adjusment on the turret, but none of these "luxuries" were avaiable, it still works really well though! I'm overall happy with it.

Rick TYler 22-02-2006 21:50

Re: How'd you do it?
 
Quote:

Originally Posted by Denz
Yes, the only problem is, when lining up the robot overshoots sometimes, and it kind of moves back and forth. This I am told is a PID problem, not sure what that means, and I'm a rookie programmer.

Oh, man, that hurts. The student head of software wrote a PID controller for the aiming process. Before that, ours hunted back and forth, too (tested on Wooden Thunder, we've never run the code on Top Gun. PID is hard -- it might take too long at this point, and if you don't have a really good mentor it might be impossible. John did test a PID-less version that worked pretty well, but it was S - L - O - W. Good luck.

Eldarion 22-02-2006 21:52

Re: How'd you do it?
 
If you have a PID loop already in place, increase the D term to dampen the oscillations.

Denz 22-02-2006 21:59

Re: How'd you do it?
 
I don't even know what a PID loop is?

I had something like this:

if (p1_sw_trig == 1)
{
if ((((int)PAN_SERVO - 131)>= 1)||(((int)PAN_SERVO - 131)<=-1))
{
RIGHT_W = (127+(12*(((int)PAN_SERVO - 131))));
LEFT_W = (127-(12*(((int)PAN_SERVO - 131))));
}
else
{
RIGHT_W = 127;
LEFT_W = 127;
}


I'm thinking maybe 12 is the D value, however, when I decrease it too much, the robot wont turn when it gets to the point of being servo steps off.

X-Istence 22-02-2006 22:15

Re: How'd you do it?
 
Mine was a rather simple one, if we were more than 20 pixels off target, we spun the wheels fast, as we got to 10 pixels, we spun them slower, until we got to where we wanted. Within the 10 range we get the most accurate shots, so after that no more adjusting. Works great on carpet, not so great on just normal floor, as the carpet gives a lot more resistance.


All times are GMT -5. The time now is 03:19.

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