Go to Post FIRST is all about helping eachother and team work, isn't it? - vadyr [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 03-08-2010, 20:01
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Is the crio powerful enough?

Its been a long time I have posted, nothing got accomplished for my fully autonomous robot idea, just whole bunch of notes and drawing in a notebook. My ideas involve heavy use of trig functions (due to the fact that I took trig in the summer, it inspired me). Now trig functions do take lots of power considering the fact that I might be using at least a dozen of them every cycle, while processing images (mass blob detection), and the locomotion and all that good stuff. Since there is no direct way to monitor memory and processor usage on the crio (or am I just unaware) how can I find out how much it is using? Am I good to go with the Math functions or do I have to make a "Trig chart" or have a onboard processor helping the crio?

If you want to know what I am doing:

I am thinking of using 2 60fps cameras as a stereo vision system and its not very complex on paper either. I think it is the perfect system to use


http://www.cellularfactory.com/lapto...108185&eng=fro
Does that look legit to you guys? Seem pretty "shady" as in Made In China status, do you really think its 60FPS? its pretty cheap though
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.

Last edited by davidthefat : 03-08-2010 at 20:15.
  #2   Spotlight this post!  
Unread 03-08-2010, 20:51
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Re: Is the crio powerful enough?

If you are using too much trig processing, then you could always use a lookup table.

You would only need one table for both Sin and Cos because of the identity "sin((PI/2.0) - X) == cos(x)"

You could also cache the results of your equations.

What are you using the trig for?
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!
  #3   Spotlight this post!  
Unread 03-08-2010, 21:02
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: Is the crio powerful enough?

Quote:
Originally Posted by biojae View Post
If you are using too much trig processing, then you could always use a lookup table.

You would only need one table for both Sin and Cos because of the identity "sin((PI/2.0) - X) == cos(x)"

You could also cache the results of your equations.

What are you using the trig for?
The distance of an object purely based on cameras, if you think about it, you will get it very easily, I need diagrams to explain it and might take long time to actually explain though. One phrase: Isosceles triangle with a known base
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #4   Spotlight this post!  
Unread 03-08-2010, 21:15
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Is the crio powerful enough?

Quote:
If you are using too much trig processing, then you could always use a lookup table.
Or you could use a polynomial approximation.

You can get a very good approximation to the sine curve from zero to pi/2 (which is all you need to construct the entire curve) with only three multiplies and three adds:

sin(x) ~ -.0017 + x*(1.027 - x*(.0729 + x*(.1116)))


~

Last edited by Ether : 03-08-2010 at 21:21.
  #5   Spotlight this post!  
Unread 03-08-2010, 21:15
Hawiian Cadder's Avatar
Hawiian Cadder Hawiian Cadder is offline
Registered User
AKA: Isaak
FRC #0159 (Alpine Robotics)
Team Role: CAD
 
Join Date: Feb 2010
Rookie Year: 2003
Location: Fort Colins Colorado
Posts: 573
Hawiian Cadder is a name known to allHawiian Cadder is a name known to allHawiian Cadder is a name known to allHawiian Cadder is a name known to allHawiian Cadder is a name known to allHawiian Cadder is a name known to all
Re: Is the crio powerful enough?

if the trig is too much you could attach a TI-83 to the crio, but i doubt the trig will be where the problem is, but in the image processing.
  #6   Spotlight this post!  
Unread 03-08-2010, 21:50
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Is the crio powerful enough?

I actually think that doing the trig functions would be faster than doing a lookup table. How long does it take to graph a sine wave on an iBook G4?
Now, what will take a while is the processing of images, ESPECIALLY with disparity maps. You'll probably require an FPGA to get the performance you're looking for. Too bad sbRIOs are in OEM quantities only.
__________________
-- Marshal Horn
  #7   Spotlight this post!  
Unread 03-08-2010, 22:08
JewishDan18's Avatar
JewishDan18 JewishDan18 is offline
Registered User
FRC #1700
Team Role: Engineer
 
Join Date: Feb 2009
Rookie Year: 2007
Location: Sunnyvale, CA
Posts: 185
JewishDan18 is a splendid one to beholdJewishDan18 is a splendid one to beholdJewishDan18 is a splendid one to beholdJewishDan18 is a splendid one to beholdJewishDan18 is a splendid one to beholdJewishDan18 is a splendid one to behold
Re: Is the crio powerful enough?

The Taylor approximation stated above is both extremely accurate and extremely fast. If it is not accurate enough, just add another term. However, I am pretty sure this is how it is done behind the scenes. It doesn't really make that much of a difference. This year, my team did crab drive w/ gyro and I used a ton of trig functions every cycle. The image processing is much much much more processing intense.
  #8   Spotlight this post!  
Unread 03-08-2010, 22:11
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: Is the crio powerful enough?

So all of you are saying that I should use extra help to process the images, but I doubt there is a legit way to do this though...
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #9   Spotlight this post!  
Unread 03-08-2010, 22:21
gblake's Avatar
gblake gblake is offline
6th Gear Developer; Mentor
AKA: Blake Ross
no team (6th Gear)
Team Role: Mentor
 
Join Date: May 2006
Rookie Year: 2006
Location: Virginia
Posts: 1,942
gblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond repute
Re: Is the crio powerful enough?

Quote:
Originally Posted by davidthefat View Post
The distance of an object purely based on cameras, if you think about it, you will get it very easily, I need diagrams to explain it and might take long time to actually explain though. One phrase: Isosceles triangle with a known base
Before you invest too much in this project, assume a reasonable error in the angles you are able to measure after you try to get both cameras to lock onto a single small point on the object. Additionally assume the object is not perfectly "broadside" to your two cameras. Then compute the range of distance errors that will arise as a consequence of those angular errors.

If you are thinking of using an FRC bot for the base of your triangle, and you are trying get the distances to objects that are scattered around an FRC field, You might be disappointed by the probable size of the distance errors

Or you might be perfectly happy. Just don't overlook the extreme precision required for accurate distance measurements across a reasonably wide field of view.

Blake
__________________
Blake Ross, For emailing me, in the verizon.net domain, I am blake
VRC Team Mentor, FTC volunteer, 5th Gear Developer, Husband, Father, Triangle Fraternity Alumnus (ky 76), U Ky BSEE, Tau Beta Pi, Eta Kappa Nu, Kentucky Colonel
Words/phrases I avoid: basis, mitigate, leveraging, transitioning, impact (instead of affect/effect), facilitate, programmatic, problematic, issue (instead of problem), latency (instead of delay), dependency (instead of prerequisite), connectivity, usage & utilize (instead of use), downed, functionality, functional, power on, descore, alumni (instead of alumnus/alumna), the enterprise, methodology, nomenclature, form factor (instead of size or shape), competency, modality, provided(with), provision(ing), irregardless/irrespective, signage, colorized, pulsating, ideate
  #10   Spotlight this post!  
Unread 03-08-2010, 22:28
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Lightbulb Re: Is the crio powerful enough?

Quote:
Originally Posted by gblake View Post
Before you invest too much in this project, assume a reasonable error in the angles you are able to measure after you try to get both cameras to lock onto a single small point on the object. Additionally assume the object is not perfectly "broadside" to your two cameras. Then compute the range of distance errors that will arise as a consequence of those angular errors.

If you are thinking of using an FRC bot for the base of your triangle, and you are trying get the distances to objects that are scattered around an FRC field, You might be disappointed by the probable size of the distance errors

Or you might be perfectly happy. Just don't overlook the extreme precision required for accurate distance measurements across a reasonably wide field of view.

Blake
I am perfectly fine with "that object is close" "that object is farther" type of thing, I am not making the next mars rover or anything I don't need to be that exact, may be off by a foot or 2 is fine
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #11   Spotlight this post!  
Unread 03-08-2010, 22:38
gblake's Avatar
gblake gblake is offline
6th Gear Developer; Mentor
AKA: Blake Ross
no team (6th Gear)
Team Role: Mentor
 
Join Date: May 2006
Rookie Year: 2006
Location: Virginia
Posts: 1,942
gblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond reputegblake has a reputation beyond repute
Re: Is the crio powerful enough?

Quote:
Originally Posted by davidthefat View Post
... off by a foot or 2 is fine
How about a foot or 50? ... There are important non-linearities in the calculations that magnify small measurement errors dramatically.
__________________
Blake Ross, For emailing me, in the verizon.net domain, I am blake
VRC Team Mentor, FTC volunteer, 5th Gear Developer, Husband, Father, Triangle Fraternity Alumnus (ky 76), U Ky BSEE, Tau Beta Pi, Eta Kappa Nu, Kentucky Colonel
Words/phrases I avoid: basis, mitigate, leveraging, transitioning, impact (instead of affect/effect), facilitate, programmatic, problematic, issue (instead of problem), latency (instead of delay), dependency (instead of prerequisite), connectivity, usage & utilize (instead of use), downed, functionality, functional, power on, descore, alumni (instead of alumnus/alumna), the enterprise, methodology, nomenclature, form factor (instead of size or shape), competency, modality, provided(with), provision(ing), irregardless/irrespective, signage, colorized, pulsating, ideate
  #12   Spotlight this post!  
Unread 03-08-2010, 22:42
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: Is the crio powerful enough?

Quote:
Originally Posted by gblake View Post
How about a foot or 50? ... There are important non-linearities in the calculations that magnify small measurement errors dramatically.
I have no idea what that means, but... Its like the IR Range finders, the voltage output is a curve, gradually evening out and becoming very inaccurate; is this an example of your explanation?
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #13   Spotlight this post!  
Unread 03-08-2010, 23:12
PAR_WIG1350's Avatar
PAR_WIG1350 PAR_WIG1350 is offline
Registered User
AKA: Alan Wells
FRC #1350 (Rambots)
Team Role: Alumni
 
Join Date: Dec 2009
Rookie Year: 2009
Location: Rhode Island
Posts: 1,190
PAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond reputePAR_WIG1350 has a reputation beyond repute
Re: Is the crio powerful enough?

I love trig

team 1350 used binocular vision in 2006 somewhat successfully, I wasn't there to get the specifics, but it used 2 CMUcams and trig, and that was with the old IFI rc, assuming there is a target that can be easily picked up at a low resolution, and the servos controlling the cameras are accurate enough (the closer the object, the less acurate they need to be), it should be *relatively simple. Streamlining the rest of the code to free up memory should also help.

Hint, research "boids", it could help with programing how to react to other robots.
__________________
  #14   Spotlight this post!  
Unread 04-08-2010, 00:27
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Is the crio powerful enough?

Quote:
Originally Posted by davidthefat View Post
I have no idea what that means, but... Its like the IR Range finders, the voltage output is a curve, gradually evening out and becoming very inaccurate; is this an example of your explanation?
It's an secant function where x is your angle and y is your distance.
You can see that after about 60 degrees it gets very inaccurate.
The IR sensor, on the other hand, is exponential decay, which makes a slightly friendlier curve. (Your error at 75% maximum distance is only +-25% of the total range of the IR sensor)
__________________
-- Marshal Horn
  #15   Spotlight this post!  
Unread 04-08-2010, 04:29
rahilm's Avatar
rahilm rahilm is offline
Registered User
AKA: Rahil Mehta
FRC #0668 (The Apes of Wrath)
Team Role: Mentor
 
Join Date: Oct 2009
Rookie Year: 2007
Location: San Jose, CA
Posts: 116
rahilm has a spectacular aura aboutrahilm has a spectacular aura about
Re: Is the crio powerful enough?

Quote:
Originally Posted by davidthefat View Post
The distance of an object purely based on cameras, if you think about it, you will get it very easily, I need diagrams to explain it and might take long time to actually explain though. One phrase: Isosceles triangle with a known base
If this is the only extent you are using this for, I think the simplest method is using an approximating equation based on just one camera.

We've tried this in the past and our greatest error was about 2inches (at a distance of 52 feet). Basically, all you have to do is take a bunch of values of the width or length of the blob versus the the actual measured distance from the camera to the object. Since sight is logarithmic, take a calculator, plug in the datapoints, generate a logarithmic regression and you're good to go.

Edit: Of course, I am speaking in terms of the last 2 games, for which 2 inches would have been a small enough tolerance.
__________________
Team 668 - Apes of Wrath - 2008-2011
Team 668 - Apes of Wrath - 2011-Present (Mentor)

Last edited by rahilm : 04-08-2010 at 04:33.
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
Reimaging the cRio Issues there are no cRio devices on the subnet Stuart FRC Control System 2 25-02-2009 23:41
617 IN THE LIMELIGHT (Close Enough) bsmmoney Chit-Chat 0 08-03-2008 00:01
pic: The gearbox that makes us so powerful keenanmolner Robot Showcase 6 20-02-2007 02:11
The end of mindstorms - no smiley face sad enough Eric Reed FIRST Lego League 20 15-01-2004 16:00
Enough with the bumpers! archiver 2000 2 23-06-2002 22:32


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

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