Go to Post The game ends after two minutes and fifteen seconds. The build season ends after six weeks. Using the experience to help improve yourself and the rest of the world will take the rest of your life. - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 27-01-2006, 02:09
Joe Hershberger Joe Hershberger is offline
National Instruments
AKA: jhersh
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 1997
Location: Austin, TX
Posts: 148
Joe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to all
Why use the RC to control Pan/Tilt

Kevin,

I'm curious why you chose to control the Pan / Tilt for the camera with the RC instead of using the control built into the camera. What advantage or additional capability do you gain by doing that?

Thanks,
-Joe
  #2   Spotlight this post!  
Unread 27-01-2006, 02:15
Eldarion's Avatar
Eldarion Eldarion is offline
Electrical Engineer / Computer Geek
AKA: Eldarion Telcontar
no team (Teamless Orphan)
Team Role: Alumni
 
Join Date: Nov 2005
Rookie Year: 2005
Location: Númenor
Posts: 558
Eldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond reputeEldarion has a reputation beyond repute
Send a message via AIM to Eldarion Send a message via Yahoo to Eldarion
Re: Why use the RC to control Pan/Tilt

Quote:
Originally Posted by Joe Hershberger
Kevin,

I'm curious why you chose to control the Pan / Tilt for the camera with the RC instead of using the control built into the camera. What advantage or additional capability do you gain by doing that?

Thanks,
-Joe
It takes longer for the CMUCam servo controller to respond (up to half a second).

This practically eliminates any kind of PI control except for the on-board one, which is also slow.

Just my $0.02
__________________
CMUCam not working? Tracks sporadically? Try this instead: http://www.falconir.com!
PM me for more information if you are interested (it's open source!).

Want the FIRST Email blasts? See here: http://www.chiefdelphi.com/forums/sh...ad.php?t=50809

"The harder the conflict, the more glorious the triumph. What we obtain too cheaply, we esteem too lightly; it is dearness only that gives everything its value."
-- Thomas Paine

If it's falling apart it's a mechanical problem. If it's spewing smoke it's a electrical problem.
If it's rampaging around destroying things it's a programming problem.

"All technology is run on 'Magic Smoke' contained within the device. As everyone knows, whenever the magic smoke is released, the device ceases to function."
-- Anonymous

I currently speak: English, some German, Verilog, x86 and 8051 Assembler, C, C++, VB, VB.NET, ASP, PHP, HTML, UNIX and SQL

Last edited by Eldarion : 27-01-2006 at 02:43.
  #3   Spotlight this post!  
Unread 27-01-2006, 03:56
scitobor 617's Avatar
scitobor 617 scitobor 617 is offline
More nerd than you can handle!
AKA: Alan Meekins
FRC #0617 (HSHS 617 "DUKE")
Team Role: Programmer
 
Join Date: Nov 2003
Rookie Year: 2003
Location: Richmond, VA
Posts: 153
scitobor 617 will become famous soon enoughscitobor 617 will become famous soon enough
Send a message via AIM to scitobor 617
Re: Why use the RC to control Pan/Tilt

By using the RC it makes it very easy to tweak or completely change the search algorithm to find the target quickly.
__________________
Beta testers needed!
http://www.nullagent.no-ip.com

Your kidding, there are other operating systems besides Linux?!
  #4   Spotlight this post!  
Unread 27-01-2006, 13:57
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Why use the RC to control Pan/Tilt

Quote:
Originally Posted by Joe Hershberger
Kevin,

I'm curious why you chose to control the Pan / Tilt for the camera with the RC instead of using the control built into the camera. What advantage or additional capability do you gain by doing that?

Thanks,
-Joe
The major reason I spend hundreds of hours a years writing and supporting code on my own dime is because I hope a few HS students might learn something new from reading my code. If they learn something cool, maybe they'll take the time to really dive into the code and improve upon it (setting the hook, so to speak). If I just took the lazy route and used the camera to do the tracking, the kids wouldn't have some code that they could use as a starting point and discussions like this one wouldn't have taken place.

Perhaps I should ask you what disadvantage is there to providing more information & learning opportunity?

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #5   Spotlight this post!  
Unread 27-01-2006, 15:06
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Why use the RC to control Pan/Tilt

Quote:
Originally Posted by Kevin Watson
...If I just took the lazy route and used the camera to do the tracking,...
I think Joe was asking why you didn't use the camera's servo outputs, not why you didn't use the camera's automatic tracking firmware.

Your provided code has a small disadvantage: the camera cannot track while the robot is disabled. That keeps robots from finding the goal target light in advance of entering autonomous operation. Using the CMUCam "SV" command instead of the RC pwm output would let robots get a lock before they are enabled to move. We're working on modifying the camera tracking code to do it that way, and I am grateful for the well-documented code.
  #6   Spotlight this post!  
Unread 27-01-2006, 15:27
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Why use the RC to control Pan/Tilt

Quote:
Originally Posted by Alan Anderson
Your provided code has a small disadvantage: the camera cannot track while the robot is disabled. That keeps robots from finding the goal target light in advance of entering autonomous operation.
If the green light is within the camera's field of view when autonomous period starts, the software will converge on a solution in much less time than it'll take to fire-up motors.

Because the software is modular, I suspect that it would be very easy to let the camera do the tracking and/or control the servos.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #7   Spotlight this post!  
Unread 28-01-2006, 05:06
Joe Hershberger Joe Hershberger is offline
National Instruments
AKA: jhersh
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: Nov 2005
Rookie Year: 1997
Location: Austin, TX
Posts: 148
Joe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to allJoe Hershberger is a name known to all
Re: Why use the RC to control Pan/Tilt

Quote:
Originally Posted by Kevin Watson
The major reason I spend hundreds of hours a years writing and supporting code on my own dime is because I hope a few HS students might learn something new from reading my code. If they learn something cool, maybe they'll take the time to really dive into the code and improve upon it (setting the hook, so to speak). If I just took the lazy route and used the camera to do the tracking, the kids wouldn't have some code that they could use as a starting point and discussions like this one wouldn't have taken place.

Perhaps I should ask you what disadvantage is there to providing more information & learning opportunity?

-Kevin
Have a bad day? Maybe a little too defensive. Not everyone has an agenda or is out to get you.

I had an honest question about the reason behind your design decision. It wasn't laced with criticism, didn't imply that you were wrong or foolish for doing it that way, and didn't even suggest a preference. Given the two options, you chose one over the other.

so....
Quote:
Originally Posted by Kevin Watson
I hope a few HS students might learn something new from reading my code... [I took that approach] to provide more information & learning opportunity.
Thanks,
-Joe
  #8   Spotlight this post!  
Unread 28-01-2006, 06:18
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Why use the RC to control Pan/Tilt

Quote:
Originally Posted by Joe Hershberger
Kevin,

I'm curious why you chose to control the Pan / Tilt for the camera with the RC instead of using the control built into the camera. What advantage or additional capability do you gain by doing that?

Thanks,
-Joe
Another advantage is that you can control the camera a different way, say mount it on top of a rotating turret, which eliminates the need for another way to pan.
__________________

  #9   Spotlight this post!  
Unread 28-01-2006, 13:27
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Why use the RC to control Pan/Tilt

Quote:
Originally Posted by Joe Hershberger
Have a bad day? Maybe a little too defensive. Not everyone has an agenda or is out to get you.

I had an honest question about the reason behind your design decision. It wasn't laced with criticism, didn't imply that you were wrong or foolish for doing it that way, and didn't even suggest a preference. Given the two options, you chose one over the other.

... snip ...

Thanks,
-Joe
*sigh* I guess this is some kind of amateurish attempt to provoke a negative response from me. I haven't a clue why you're being so disingenuous or what your agenda is, but you should be ashamed of yourself for pulling something like this in a public forum where we're attempting to promote engineering and the sciences as a career choice for adults.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #10   Spotlight this post!  
Unread 28-01-2007, 01:54
htwiz2002's Avatar
htwiz2002 htwiz2002 is offline
Htwizard
AKA: Anthony Takata Bawahawba
#1290
Team Role: Engineer
 
Join Date: Jan 2004
Location: Chandler, AZ
Posts: 23
htwiz2002 will become famous soon enough
Question Re: Why use the RC to control Pan/Tilt

I have a small question (which is probably answered somewhere obvious) But how do I go about setting the pwm values on the camera?
I have it hooked up properly (based on last year's camera, which worked apparently) however I don't know how to get the camera to output values to them.

I can verify the pwms are plugged in correctly because upon initialization and (possible) activation the camera ZIPP!s into position (and stays there no matter what i set pwm01 or pwm02, or PAN or TILT).


What do I do to set this?

Edit:

I just read Rule <R28> revision #2 which stated that i could not use the 2006 camera! Oops . Well, I guess i need to get longer pwm cables! . Oh well, just go with the flow...
__________________
TsAuKpAeTrA (Anthony)

Last edited by htwiz2002 : 28-01-2007 at 02:33. Reason: Updated infor changed question
  #11   Spotlight this post!  
Unread 28-01-2007, 09:38
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: Why use the RC to control Pan/Tilt

It is not legal to control servos with the camera's PWM output this year anyway:

http://forums.usfirst.org/showthread.php?t=1747
  #12   Spotlight this post!  
Unread 28-01-2007, 15:55
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Why use the RC to control Pan/Tilt

Quote:
Originally Posted by jgannon View Post
But c'mon... give the kid a break.
1) He's an engineer, not a kid.

2) My exchange with Joe is a year old. I'm going to have a talk with some CMU professors I know, because they clearly aren't piling on enough work if you have this much free time on your hands .

3) In hindsight I can certainly see why you might think I was quick to jump on Joe, but you're not aware of the other messages that preceeded my exchange with him that convinced me he was playing the alpha-geek game. As there are few things in life I dislike more than getting pulled into an alpha-geek game, I quickly made it undesirable for Joe to continue so that I could get back to more enjoyable endeavors. One of the best methods to quickly stop such activity is to shine a light on it and call it what it is: bad behavior. Though my timing was off, this is exactly what I did, and it worked. Unfortunatly, because I was too quick to fix the problem, it made me look like I'm nuts, which may or not be true .

4) I think I have a few good reasons for choosing to use the RC PWM outputs rather than the CMUcam2 outputs. I've noticed quite a few questions about the subject this year, so I think I'll give the quick answer here and then follow-up with a more detailed answer in the FAQ if time allows.

Firstly, I wanted teams to have all the source code in their hands so that they could have something to improve upon should they desire, including the searching/tracking code.

Secondly, it made more sense to me to have the camera send t-packets as fast as it could (~11 Hz) by using the Track Color command. Otherwise I would need to used polled mode, which is much less efficient and possibly risky because I'd need to asynchronously cross clock domains twice, instead of once.

Third, I had a hard time getting the camera to initialize correctly. It would lock-up and stop communicating if I didn't send it commands with perfect timing and in just the right order. The experience dealing with the fragile communication interface made me a little apprehensive about using polled mode, and made the use of the streaming Track Color command that more attractive. The last thing I wanted was to be mentioned in the same sentence as the FRC scoring software, so I took the more conservative approach.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org

Last edited by Kevin Watson : 30-01-2007 at 23:01. Reason: Questionable grammer.
  #13   Spotlight this post!  
Unread 28-01-2007, 16:08
jgannon's Avatar
jgannon jgannon is offline
I ᐸ3 Robots
AKA: Joey Gannon
no team
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Pittsburgh, PA
Posts: 1,467
jgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond reputejgannon has a reputation beyond repute
Re: Why use the RC to control Pan/Tilt

Okay, now I look like I'm nuts... I didn't notice that somebody else had brought this thread back from the dead. I understand the "alpha geek game" you're talking about, and I sympathize. In any case, I take it back. And yes, I'll be getting back to my work now (CMU gives me plenty without your help, thanks). I'm just glad to see that you haven't completely lost it.

Also, thanks for the explanation of why you're doing it the way you are. I'm currently trying to cobble together some CMUCam stuff with your EDU serial ports code for a different project, and now I've got some things to think about.
__________________
Team 1743 - The Short Circuits
2010 Pittsburgh Excellence in Design & Team Spirit Awards
2009 Pittsburgh Regional Champions (thanks to 222 and 1218)
2007 Pittsburgh Website Award
2006 Pittsburgh Regional Champions (thanks to 395 and 1038)
2006 Pittsburgh Rookie Inspiration & Highest Rookie Seed

Team 1388 - Eagle Robotics
2005 Sacramento Engineering Inspiration
2004 Curie Division Champions (thanks to 1038 and 175)
2004 Sacramento Rookie All-Star

_
  #14   Spotlight this post!  
Unread 30-01-2007, 22:26
Danny Diaz's Avatar
Danny Diaz Danny Diaz is offline
Smooth Operator
AKA: FrankenMentor
None #0418
Team Role: Alumni
 
Join Date: Apr 2005
Rookie Year: 2003
Location: Manchester, NH
Posts: 545
Danny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond reputeDanny Diaz has a reputation beyond repute
Send a message via AIM to Danny Diaz
Re: Why use the RC to control Pan/Tilt

Quote:
Originally Posted by Kevin Watson View Post
The last thing I wanted was to be mentioned in the same sentence as the FRC scoring software, so I took the more conservative approach.
Ouch, that hits close to homework. Some ideas that seem really cool early on should just be avoided, the problem is that the point at which you realize you should have quit sometimes comes right after you've finished. I sometimes wish I was one of those who doesn't know what you're talking about, as my ears are still ringing from it and I didn't have a part in it!

-Danny
__________________
Danny Diaz
Former Lead Technical Mentor, FRC 418
  #15   Spotlight this post!  
Unread 30-01-2007, 22:59
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Why use the RC to control Pan/Tilt

Quote:
Originally Posted by Danny Diaz View Post
Ouch, that hits close to homework. Some ideas that seem really cool early on should just be avoided, the problem is that the point at which you realize you should have quit sometimes comes right after you've finished. I sometimes wish I was one of those who doesn't know what you're talking about, as my ears are still ringing from it and I didn't have a part in it!

-Danny
Whoops, no, I wasn't referring to what you think I was referring to! I was thinking about the organization that had overall cognizance of the scoring system for the last few years.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Concept of PID explained ConKbot of Doom Technical Discussion 11 27-01-2008 00:11
Pre-manufactured control box for FIRST Ben.V.293 Technical Discussion 19 22-08-2005 12:53
2005 RadioShack Innovation In Control Award--What Won? Billfred Control System 8 12-06-2005 01:51
2005 RadioShack® Innovation in Control Award! dez250 General Forum 10 10-03-2005 21:29
What do you wish you knew about the new control system? Joe Ross Control System 2 09-01-2004 21:47


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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