Go to Post Because, y'know, FIRST can't make it easy for us. - WinterPoet [more]
Home
Go Back   Chief Delphi > Other > FIRST Tech Challenge
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rating: Thread Rating: 22 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 14-11-2012, 15:19
JohnFogarty's Avatar
JohnFogarty JohnFogarty is offline
Trapped under a pile of MECANUMS :P
AKA: @doctorfogarty
FTC #11444 (Garnet Squadron) & FRC#1102 (M'Aiken Magic)
Team Role: Mentor
 
Join Date: Aug 2009
Rookie Year: 2006
Location: SC
Posts: 1,580
JohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond repute
FTC 2012 RobotC IR Sensor Programming and implementation

So as you all very well know we have another IR beacon challenge on our hands. I know there have been teams who have had varying success with the sensor before like team 2818 GForce though a far as I'm aware they use LabVIEW. Have there been any teams using RobotC that have successfully used the IR sensor to guide their robot towards a target.
I have looked over the included driver and test/example files with RobotC and I can't make heads or tails of it really.
I've been told that there is a 30 degree area of detection where the sensor reads a certain value. Which makes me think that it can't be that accurate on its own. Can some teams give some code examples of how your team used the sensor in the past years as well as how you placed it on your robot or if you used 2 sensors in combination.
__________________
John Fogarty
2010 FTC World Championship Winner & 2013-2014 FRC Orlando Regional Winner
Mentor FRC Team 1102 M'Aiken Magic
"Head Bot Coach" FTC Team 11444 Garnet Squadron
Former Student & Mentor FLL 1102, FTC 1102 & FTC 3864, FRC 1772, FRC 5632
2013 FTC World Championship Guest Speaker
Reply With Quote
  #2   Spotlight this post!  
Unread 14-11-2012, 15:46
maths222 maths222 is offline
FTC FTA
AKA: Jacob Burroughs
no team
 
Join Date: Nov 2011
Rookie Year: 2010
Location: United States
Posts: 148
maths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to beholdmaths222 is a splendid one to behold
Re: FTC 2012 RobotC IR Sensor Programming and implementation

I use this code: https://hprobotics.googlecode.com/sv...IRController.h to get a more accurate reading from the sensor. Additionally, I use two controllers with the following code:


dir=IRGetACDir(IRSLeft)-(10-IRGetACDir(IRSRight));
if (dir<0)
{
leftSpeed(-50);
rightSpeed(50);
}
if (dir>0)
{
leftSpeed(50);
rightSpeed(-50);
}
if (dir==0)
{
leftSpeed(50);
rightSpeed(50);
}
__________________
--Jacob
Illinois FTC FTA
Reply With Quote
  #3   Spotlight this post!  
Unread 14-11-2012, 18:42
l0jec l0jec is offline
Registered User
no team
 
Join Date: Oct 2009
Rookie Year: 2004
Location: St. Louis, MO
Posts: 52
l0jec has a spectacular aura aboutl0jec has a spectacular aura about
Re: FTC 2012 RobotC IR Sensor Programming and implementation

Of course. The IR Seeker is actually extremely easy to use; a lot of ROBOTC teams who use it successfully, utilize Xander's 3rd Party Drivers (hitechnic-irseeker-v2.h to be specific).

As for placement, a lot of teams will place it at an angle to get the sweet spot between detectors such as zones 4 or 6. This has nothing to do with LabView or ROBOTC, but rather with the internals of the sensor.

See this student presentation for more details: http://stlfirst.org/LinkClick.aspx?fileticket=jNken9UOcfA%3d&tabid=263 &mid=876

Last edited by l0jec : 14-11-2012 at 18:42. Reason: Spelling
Reply With Quote
  #4   Spotlight this post!  
Unread 05-12-2012, 19:01
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 747
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: FTC 2012 RobotC IR Sensor Programming and implementation

To get the most out of the IR seeker, you need to use both types of data that the sensor provides.

These are:
1) The Beam Number
2) The signal strengths of the actual IR receivers (there are 5 of them)

9 detection zones are formed from the 5 IR sensors in the device.
These are either 60 deg wide or 5 deg wide.
For accurate tracking you need to use the 5 Deg ones. (Beams 2,4,6,8)
Once you turn your robot so you are in one of the narrow beams, you can look at the signal strengths of the two adjacent IR receivers. If the left receiver is stronger, the target is to the left of center, and if the right is stronger, the target is right of center.

Using this information you can drive towards the target and be within a degree or so. Plenty close enought to score a ring.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote
  #5   Spotlight this post!  
Unread 07-12-2012, 12:37
smcmahon's Avatar
smcmahon smcmahon is offline
The Architect
AKA: Sean McMahon
FRC #2656 (QUASICS)
Team Role: Coach
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Pittsburgh, PA
Posts: 197
smcmahon is an unknown quantity at this point
Re: FTC 2012 RobotC IR Sensor Programming and implementation

Phil,

We're using LabVIEW, and for us, the IR Seeker outputs two sets of data:

[1] is the Direction, which is an integer value, 0-9 (we think)
[2] is a Signal Strength array, with the five values

We discovered this later last night, so we won't be able to do any testing until tomorrow. So, if you know, what sort of data kicks out of that array? Is it just positive numbers, such as 0-10, or 1-100? How does it show it has ZERO signal strength?

I think we can do math on those values, as you suggested, but I'm just unsure what exact data is used to represent those signal strengths.
__________________
FRC 2656 | FTC 5526 | VEX 9656
Reply With Quote
  #6   Spotlight this post!  
Unread 07-12-2012, 17:27
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 747
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: FTC 2012 RobotC IR Sensor Programming and implementation

The signal strengths are positive numbers .. maybe in the 0-100 range.

You don't need to do any math per-se...

The only time you are interested in the 5 discrete sensor values is when you are ON a narrow beam (2,4,6,8).

Then all you do is look at the relative strength of the two adjacent IR sensors... this just tells you which side of center, the beacon is.


Here's what I did the first year we used the IR seeker...
Made a compass out of paper (with degree markings)
Mounted the compass and IR Seeker on a camera tripod so I could spin it.
Mounted an IR beacon on a wall in front of the tripod.
Wrote an NXT program to read the seeker and display the Beam number and 5 signal strenghts.

Sat on the floor and slowly rotated the tripod head and watched the numbers changing.

You can learn a LOT this way. We discovered the whole 5 Deg, 60 deg thing way before they published the white paper. We could auto aim and shoot wiffle balls into the spinning goal from the corner of the field.

I personally think Hitechnic missed the boat on this one, and should do a Seeker V3 that has 4 IR receivers centered on "forward" so the 5 Deg beam is centered, rather that 30 Deg off to one side.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote
  #7   Spotlight this post!  
Unread 12-12-2012, 03:06
RRLedford RRLedford is offline
FTC 3507 Robo Theosis -- FRC 3135
AKA: Dick Ledford
FRC #3135 (Robotic Colonels)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Chicago, IL USA
Posts: 286
RRLedford has a reputation beyond reputeRRLedford has a reputation beyond reputeRRLedford has a reputation beyond reputeRRLedford has a reputation beyond reputeRRLedford has a reputation beyond reputeRRLedford has a reputation beyond reputeRRLedford has a reputation beyond reputeRRLedford has a reputation beyond reputeRRLedford has a reputation beyond reputeRRLedford has a reputation beyond reputeRRLedford has a reputation beyond repute
Re: FTC 2012 RobotC IR Sensor Programming and implementation

This I/R detector makes no sense to me.

Issue #1 -What are the 9 "zones" and how does the 5-detector array define them. If the sensor "sees" 240 degrees, across five dector array zones, then is each detector handling 48 degrees of the the total 240 degree span, or do the individual detectors have wider overlapping views (maybe 60 degrees with 12 degree overlap?

Issue #2 - What causes the nine zones to have different "beam" arc widths (5 & 60 degree)? In fact why is the term "beam" even applied to the sensor, since the actual I/R energy beam is being sent from the beacon & no "beaming" should happen at the sensor? Is there some kind of prismatic beam focusing effect happening in the lens that slices up the incoming I/R energy such that it concentrates narrower slices (5 degrees worth of the 240 degree field) on the the radial midpoint axis between detectors, and it slices 60 degree slices of the 240 degrees of incoming I/R energy onto the radial central axis of each of the five detectors?

Issue #3 - If the sensor's central axis for zone 4 field view (located halfway between detectors 2&3 - with a 0-1-2-3-4 detector numbering scheme) is pointed straight ahead, and sensor is positioned at center of the bot, then when the data readout list indicates that the five detector array readings are coming from the zone 4 sector of the incoming I/R energy field (5 degree segment), then, when the bot is lined up centered in front of the beacon, shouldn't the detector array list of the five zone 4 direction array data values be showing that the highest number will be for the middle detector and the # values for the two adjacent I/R array detectors should be BOTH be somewhat less than the middle detector value, AND also nearly equal to each other?

Issue #4 - As the robot moves, what causes the I/R sensor to cycle through the zone numbers as it updates the data list with new values? Is it just that the sensor somehow determines that the peak energy is coming from that direction? How does the sensor ignore the incoming I/R energy from the other zones, and how does it decide which four to ignore?

I really don't understand how the sensor slices up the incoming 240 degree field of I/R energy into the 5 & 60 degree segments, and how the array knows what energy is hitting it from which slice of the 240 degree field?

Does the lens block incoming I/R energy from hitting the detector with some sort of staggered, variable angular width blinders that cast shadows on the detector, only allowing a certain sized (5 or 60 degrees) angular slice of the I/R energy reach the detector according to the directional line from the beacon to the sensor and the sensor pointing direction?

-Dick Ledford
__________________
FTC 3507 RoboTheosis
FRC 3135 Robotic Colonels

Last edited by RRLedford : 12-12-2012 at 03:13.
Reply With Quote
  #8   Spotlight this post!  
Unread 12-12-2012, 08:06
PhilBot's Avatar
PhilBot PhilBot is offline
Get a life? This IS my life!
AKA: Phil Malone
FRC #1629 (GaCo: The Garrett Coalition)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Maryland
Posts: 747
PhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond reputePhilBot has a reputation beyond repute
Re: FTC 2012 RobotC IR Sensor Programming and implementation

Hey Dick.

Check out this doc from a few years back...

http://www.usfirst.org/sites/default...icsR2-rev2.pdf

The IR seeker is made using 5 discrete sense elements. Each element has an approximate 60 Degree sensitivity area. These also overlap each other by about 5 degrees to form a dusl sense area (beam). This overlap is usefull because it provide a narrow sense area, but there is not one that is centered on the "forward" direction of the seeker.

If you want to understand it beter, chek out some related IR seeker links here:

http://www.usfirst.org/roboticsprogr...ionalresources
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org

FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor
Reply With Quote
  #9   Spotlight this post!  
Unread 13-12-2012, 09:46
smcmahon's Avatar
smcmahon smcmahon is offline
The Architect
AKA: Sean McMahon
FRC #2656 (QUASICS)
Team Role: Coach
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Pittsburgh, PA
Posts: 197
smcmahon is an unknown quantity at this point
Re: FTC 2012 RobotC IR Sensor Programming and implementation

We were able to find some sample code that shows the 5 signal strengths on the NXT brick. The values seem to go from 0-255. Strangely enough, they show some readings we didn't expect, like having a sort of 'dead zone' in what would be Direction 3.

Again, as a LabVIEW team, we're thoroughly confounded with using this thing for navigation. We're gonna keep plugging away though, and if we get some stuff that works reliably, we'll post the code here.
__________________
FRC 2656 | FTC 5526 | VEX 9656
Reply With Quote
Reply


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


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

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