Go to Post On the one hand, I wouldn’t want to discourage innovation. But on the other, I would want to encourage simplicity. - Jack Jones [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
  #46   Spotlight this post!  
Unread 16-01-2007, 14:10
Guy Davidson Guy Davidson is offline
Registered User
AKA: formerly sumadin
FRC #0008 (Paly Robotics)
Team Role: Alumni
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Ra'anana, Israel
Posts: 660
Guy Davidson is a splendid one to beholdGuy Davidson is a splendid one to beholdGuy Davidson is a splendid one to beholdGuy Davidson is a splendid one to beholdGuy Davidson is a splendid one to beholdGuy Davidson is a splendid one to beholdGuy Davidson is a splendid one to beholdGuy Davidson is a splendid one to behold
Send a message via ICQ to Guy Davidson Send a message via AIM to Guy Davidson Send a message via MSN to Guy Davidson
Re: Where is the multi object tracking code for the RC?

We're currently looking at a number of things. Of particular interest to us is the relationship between the location of the centroid and the locations of the top-left and lower-right corners. We're hoping to use the fact that the centroid is closer to the light with a smaller angle to the robot in order to write a function that takes those three locations and tells us enough about where the lights are to either lock-in on one of them or on the middle.

-Guy
  #47   Spotlight this post!  
Unread 16-01-2007, 16:10
joe250 joe250 is offline
Registered User
FRC #0250
 
Join Date: Jan 2007
Location: New York
Posts: 2
joe250 is an unknown quantity at this point
Re: Where is the multi object tracking code for the RC?

Quote:
Originally Posted by Donut View Post
I'm not sure how many of the teams have gotten to the camera yet. Our team does mainly design and field elements the first week, so we haven't touched the camera yet.
We are in a similar situation, and I was hoping to begin camera work this week. Kevin, I'm actually glad that you've decided not to release your camera code right away and have instead just gently prodded () us in the right direction. Though your code is phenomenal and a big help, it has been a lot of fun this year to try to figure out some possible alternative solutions (especially for such an interesting problem).

To all the people who have proposed methods other than the one used by the EasyC code: would you care to share any test results or code for those methods? It would be very time consuming for everyone to test every method for its viability, so perhaps some collaboration would be useful.

I'll try to post some LabView Code and C source if I can test the VW thin-slicing method soon. Thanks again to Kevin and everyone else's input on this topic
  #48   Spotlight this post!  
Unread 16-01-2007, 19:03
maniac_2040's Avatar
maniac_2040 maniac_2040 is offline
Registered User
AKA: Matt
FRC #3302 (Turbo Trojans)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Clawson, Michigan
Posts: 34
maniac_2040 is infamous around these partsmaniac_2040 is infamous around these partsmaniac_2040 is infamous around these partsmaniac_2040 is infamous around these parts
Send a message via MSN to maniac_2040
Re: Where is the multi object tracking code for the RC?

Quote:
Originally Posted by Kevin Watson View Post
I've been making suggestions on how this could be done in the hope that someone would modify my code (tracking.c) and discuss their modifications here. Given the lack of actual discussion taking place, I'm not sure if teams just went into their "Skunk Works" mode or if teams are just throwing-up their collective hands and not working on it.

Anyway, I have an idea for an algorithm that I'll have time to test out over the next few evenings. If it works well, I'll post it on my website. As all good engineers keep a backup plan in their pocket, you might consider implementing one of the other algorithms discussed in the forums, or invent your own. Either way, your time won't be wasted thinking about the problem.

-Kevin
Well, it's not like I wasn't/haven't been thinking about this. I only asked because I was about to start hardcoding and wanted to know if I should wait. It would be stupid to code up a whole solution if I knew that one would already be available in a few days(no need to reinvent the wheel). I have been thinking about this quite a bit.
  #49   Spotlight this post!  
Unread 16-01-2007, 22:52
Brad Voracek Brad Voracek is offline
.999~=1
FRC #0399 (Eagle Robotics)
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Lancaster, CA (SoCal)
Posts: 328
Brad Voracek is a glorious beacon of lightBrad Voracek is a glorious beacon of lightBrad Voracek is a glorious beacon of lightBrad Voracek is a glorious beacon of lightBrad Voracek is a glorious beacon of light
Send a message via AIM to Brad Voracek
Re: Where is the multi object tracking code for the RC?

Quote:
Originally Posted by Kevin Watson View Post
.... Basically, range = (green light height - camera height)/tan(tilt angle), ... tilt angle is the calculated tilt angle derived from the tilt PWM value when the tracking software has a good solution. ...

-Kevin
My question, what is the best way to change those PWM outputs to a tangible angle for the tangent function to use? Our team didn't get to test the camera much last year... So it's all sort of new for me. Obviously it has to be in radians, because, correct me if I'm wrong the tan function in C is based off of radians.

I've thought about ways to do this, and it isn't all too complicated... I just need to test it out, and make sure 127 would be the camera pointing parallel with the ground. I'll get to testing it, but I'm wondering what you guys have come up with for this?
  #50   Spotlight this post!  
Unread 16-01-2007, 23:46
Bharat Nain's Avatar
Bharat Nain Bharat Nain is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Jan 2004
Rookie Year: 2003
Location: New York
Posts: 2,000
Bharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond repute
Send a message via AIM to Bharat Nain Send a message via MSN to Bharat Nain
Re: Where is the multi object tracking code for the RC?

Quote:
Originally Posted by maniac_2040 View Post
Well, it's not like I wasn't/haven't been thinking about this. I only asked because I was about to start hardcoding and wanted to know if I should wait. It would be stupid to code up a whole solution if I knew that one would already be available in a few days(no need to reinvent the wheel). I have been thinking about this quite a bit.
You might as well start experimenting. Neither Kevin, nor anyone else(apart from maybe GDC) knows how autonomous will turn up. If Kevin comes up with a better solution for your purpose, use it.
__________________
-= Bharat Nain =-

Whatever you do, you need courage. Whatever course you decide upon, there is always someone to tell you that you are wrong. There are always difficulties arising that tempt you to believe your critics are right. To map out a course of action and follow it to an end requires some of the same courage that a soldier needs. Peace has its victories, but it takes brave men and women to win them. - Ralph Waldo Emerson
  #51   Spotlight this post!  
Unread 17-01-2007, 06:58
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: Where is the multi object tracking code for the RC?

Quote:
Originally Posted by Brad Voracek View Post
My question, what is the best way to change those PWM outputs to a tangible angle for the tangent function to use?
I believe the best way is not to use the tangent function on an angle in the code. It's both easier and quicker to use a small lookup table that turns the camera tilt PWM value into a distance.

You can use a tangent function when you create the lookup table, of course. Or you can fill in the table empirically by repeatedly placing the robot a known distance from the target and observing the tilt angle.
  #52   Spotlight this post!  
Unread 17-01-2007, 09:40
Brad Voracek Brad Voracek is offline
.999~=1
FRC #0399 (Eagle Robotics)
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Lancaster, CA (SoCal)
Posts: 328
Brad Voracek is a glorious beacon of lightBrad Voracek is a glorious beacon of lightBrad Voracek is a glorious beacon of lightBrad Voracek is a glorious beacon of lightBrad Voracek is a glorious beacon of light
Send a message via AIM to Brad Voracek
Re: Where is the multi object tracking code for the RC?

Quote:
Originally Posted by Alan Anderson View Post
I believe the best way is not to use the tangent function on an angle in the code. It's both easier and quicker to use a small lookup table that turns the camera tilt PWM value into a distance.

You can use a tangent function when you create the lookup table, of course. Or you can fill in the table empirically by repeatedly placing the robot a known distance from the target and observing the tilt angle.
Ahh, that makes a lot of sense. Thanks.
  #53   Spotlight this post!  
Unread 17-01-2007, 11: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: Where is the multi object tracking code for the RC?

Quote:
Originally Posted by Brad Voracek View Post
Ahh, that makes a lot of sense. Thanks.
Just FYI, you can create that table, and read from it using the EEPROM code at http://kevin.org/frc.

Edit: I also wrote some example code that creates an 8- and/or 16-bit sine table in EEPROM with one piece of code and then allows you to quickly do a sin() or cos() lookup using another piece of code (stuff written to EEPROM is permanent until you erase it). I haven't written any formal documentation yet, but I think the code is fairly readable. The code can be found here: http://kevin.org/frc/frc_trig.zip.

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

Last edited by Kevin Watson : 17-01-2007 at 12:03.
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
Changing the visibility of an object 65_Xero_Huskie 3D Animation and Competition 9 28-01-2006 17:12
Where to get the 2006 default code? Eldarion Programming 12 15-01-2006 15:48
where can I find the code for the first 15 seconds? CompMaster Programming 2 16-02-2005 16:23
Where is the CMUcam2 code? Matthew_H Programming 1 14-01-2005 17:49
The object of Zone Zeal???? Jay5780 General Forum 15 09-04-2002 19:54


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

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