Go to Post I don't care if my team wins. I care if they try their hardest to win. - pfreivald [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 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
  #2   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.
  #3   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?
  #4   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.
  #5   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
  #6   Spotlight this post!  
Unread 06-01-2007, 18:09
JBotAlan's Avatar
JBotAlan JBotAlan is offline
Forever chasing the 'bot around
AKA: Jacob Rau
FRC #5263
Team Role: Mentor
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Riverview, MI
Posts: 723
JBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond repute
Send a message via AIM to JBotAlan Send a message via Yahoo to JBotAlan
Re: Where is the multi object tracking code for the RC?

I am confused; I didn't even know that the *hardware* supported multiple objects. I'll have to have a look-see at that code to figure out how multi-tracking works.

JBot
__________________
Aren't signatures a bit outdated?
  #7   Spotlight this post!  
Unread 06-01-2007, 18: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: Where is the multi object tracking code for the RC?

Quote:
Originally Posted by JBotAlan View Post
I am confused; I didn't even know that the *hardware* supported multiple objects. I'll have to have a look-see at that code to figure out how multi-tracking works.

JBot
The hardware doesn't support tracking of multiple objects. The code that Dave mentioned, written by FIRST's Neil Rosenberg, infers the location of a "spider leg" by looking at the size of the image. If there are two lights in the scene -- which is not always the case -- the camera returns a blob size that is far too big to be from one light. If the blob size is small, you know that there is only one light in the scene and there is a spider leg directly underneath.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #8   Spotlight this post!  
Unread 06-01-2007, 18:39
DanDon's Avatar
DanDon DanDon is offline
ohhh MY god
AKA: Dan Hoizner
FRC #0375 (The Robotic Plague)
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Staten Island, NY
Posts: 1,432
DanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond reputeDanDon has a reputation beyond repute
Send a message via ICQ to DanDon Send a message via AIM to DanDon Send a message via MSN to DanDon
Re: Where is the multi object tracking code for the RC?

Kevin,

If you did write code (I hope I'm not misinterpreting your post), do you have an approximate release date?
__________________
  #9   Spotlight this post!  
Unread 06-01-2007, 18:52
robind robind is offline
Registered User
FRC #0675
 
Join Date: Dec 2006
Location: Rohnert Park
Posts: 31
robind is an unknown quantity at this point
Re: Where is the multi object tracking code for the RC?

Bump? It sounds like Kevin's leading us on a little, but I would love love love to have that code.
  #10   Spotlight this post!  
Unread 06-01-2007, 22:07
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: Where is the multi object tracking code for the RC?

Kevin, if your 2007 code can has the tracking similar to what Neil wrote then I apologize as I was misinformed.

Kevin is 100% correct the CMU can't track multiple objects the code just looks at the size of the target region and if its over a certain size prints that its looking a 2 targets. In the demo they used a terminal emulation program and used VT100 calls. We made our own custom terminal window and function to do the same thing in easyC PRO.

WPILIB is 100% compatible with MPLAB, and Eclipse. Infact it's currently being written and maintained in Eclipse,
WPI has been using it since 2005 on their FRC robots.
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni

Last edited by Kingofl337 : 06-01-2007 at 22:12.
  #11   Spotlight this post!  
Unread 07-01-2007, 00:48
arshacker arshacker is offline
Registered User
#0545
 
Join Date: Jan 2003
Location: long island, ny
Posts: 8
arshacker has a little shameless behaviour in the past
Re: Where is the multi object tracking code for the RC?

any reason why easyc can't open bds file for the multi-object tracking code??
  #12   Spotlight this post!  
Unread 06-01-2007, 18:14
Ctrl Alt Delete's Avatar
Ctrl Alt Delete Ctrl Alt Delete is offline
Code Monkey
AKA: David Weitz
FRC #0177 (Bobcats)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Connecticut
Posts: 89
Ctrl Alt Delete is a splendid one to beholdCtrl Alt Delete is a splendid one to beholdCtrl Alt Delete is a splendid one to beholdCtrl Alt Delete is a splendid one to beholdCtrl Alt Delete is a splendid one to beholdCtrl Alt Delete is a splendid one to behold
Send a message via AIM to Ctrl Alt Delete Send a message via MSN to Ctrl Alt Delete
Re: Where is the multi object tracking code for the RC?

OK, so we have to use WPILib to get the tracking code? We were going to use FusionEdit and not easyC.
__________________

Life lessons learned at robot:
1.) Never take apart power strips
2.) Sleep is required, but not essential to survival

Failure to abide by these lessons will result in headaches...and flaming pants.

"Here at Bobcat Robotics, we pride ourselves in having 60-table MySQL databases, girlfriend cookies, and a vinyl cutter." -Chris Jelly
  #13   Spotlight this post!  
Unread 07-01-2007, 12:36
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Where is the multi object tracking code for the RC?

The way the camera works is that it takes a picture, finds all the pixels that fall into a color range, and finds information about them. The information I've used in the past is:
  • bounding box (x1, y1, x2, y2)
  • The median point (mx, my)
  • The pan/tilt (see note)
  • a "confidence" (basically a ratio of the color blob area to the area of the image)
  • IIRC, some statistical information about the color is also provided.
Note: In 2005, the camera would drive its own servos and report their values. In 2006, the code would not configure this way, instead relying on the RC to do it. (I changed this to the 2005 behavior in my own code.) I do not know yet what the behavior is this year.

I do not remember if the camera provides the number of separate blobs in the default information. If it does not, the communication overhead and computation requirements would likely be prohibitive. If it does, there is a good chance that you can not get the separate bounding box/median information for each blob.

Of course, I'm likely to eat my words when the actual code gets around.

EDIT: Wow. How much discussion occurs while I post!

Last edited by Astronouth7303 : 07-01-2007 at 12:54.
  #14   Spotlight this post!  
Unread 07-01-2007, 12:48
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 Astronouth7303 View Post
I do not remember if the camera provides the number of separate blobs in the default information. If it does not, the communication overhead and computation requirements would likely be prohibitive. If it does, there is a good chance that you can not get the separate bounding box/median information for each blob.
Yes you can, but the RC needs to control the pan/tilt servos...

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #15   Spotlight this post!  
Unread 07-01-2007, 14:43
Eclipse's Avatar
Eclipse Eclipse is offline
Registered User
AKA: Sensei Hanzo
FRC #1250 (Gatro-Bots)
Team Role: Programmer
 
Join Date: Feb 2006
Rookie Year: 2004
Location: Dearborn, MI
Posts: 18
Eclipse is an unknown quantity at this point
Re: Where is the multi object tracking code for the RC?

How exactly does one access the data pertaining to the individual blobs? I didn't remember ever seeing anything like that in the code...
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 01:22.

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