Go to Post Find what your team is good at, and use it in any way you can. - karomata [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 12-01-2011, 18:40
cooldude8181's Avatar
cooldude8181 cooldude8181 is offline
Registered User
AKA: Charlie Davies
FRC #1245 (Shazbots)
Team Role: Programmer
 
Join Date: Oct 2008
Rookie Year: 2009
Location: Colorado
Posts: 39
cooldude8181 is an unknown quantity at this point
2011 "Light Sensor"

Has anyone been trying to program their light sensors for this year yet? Are there any examples for Labview that are relevant besides the "simple digital input" one?
  #2   Spotlight this post!  
Unread 12-01-2011, 19:44
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,856
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: 2011 "Light Sensor"

That's all the light sensor is, a simple digital input.

Did you have a more complex task in mind?
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #3   Spotlight this post!  
Unread 12-01-2011, 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
Re: 2011 "Light Sensor"

I assume it returns a boolean. I have not looked at the libraries yet, I am currently teaching the other programmers the last year's library. (Its the same as this year technically) How many do they give you? Make it so that 3 of them point in different spots in front of the robot. So the outer 2 sensors would form an angle big enough (it would depend on where you place the sensors) and the middle one would be placed at the angle bisector. So It checks if the middle triggers true, it it does, its on track. If the left is triggered, you are too far right, turn left a little and same with the right side. That should be the basic loop. If they are all triggered, you are at a cross point or a stop point.
__________________
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 12-01-2011, 20:10
mwtidd's Avatar
mwtidd mwtidd is offline
Registered User
AKA: mike
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2003
Location: Boston, MA
Posts: 714
mwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond repute
Re: 2011 "Light Sensor"

Will your robot be able to strafe, if so you may want to consider the camera. The way I look at it the line sensors are best if you can't strafe, but the camera is better if you can.

If you want more details just ask...
__________________
"Never let your schooling interfere with your education" -Mark Twain
  #5   Spotlight this post!  
Unread 12-01-2011, 20:25
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: 2011 "Light Sensor"

Quote:
Originally Posted by lineskier View Post
Will your robot be able to strafe, if so you may want to consider the camera. The way I look at it the line sensors are best if you can't strafe, but the camera is better if you can.

If you want more details just ask...
Details por favor. I mean details on why you have that belief. I don't see why the line sensors would not be as efficient on a strafing bot than on a robot that can't. Is it because the strafing bot has to change its rotation of the motors(I think these are called crab drive) or reverse the motors (mecanium or omni) to strafe? The robot has to do those actions even with a camera.
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #6   Spotlight this post!  
Unread 12-01-2011, 20:29
Charlie675 Charlie675 is offline
Registered User
FRC #0675
 
Join Date: Jan 2010
Location: Sebastopol, CA
Posts: 7
Charlie675 is an unknown quantity at this point
Re: 2011 "Light Sensor"

How do you follow the line with the camera? That sounds pretty awesome. You would probably have to go slow though because the camera's refresh rate is terrible.
  #7   Spotlight this post!  
Unread 12-01-2011, 20:31
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,588
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: 2011 "Light Sensor"

Quote:
Originally Posted by cooldude8181 View Post
Has anyone been trying to program their light sensors for this year yet? Are there any examples for Labview that are relevant besides the "simple digital input" one?
Have you looked at the autonomous vi in the framework with game specific code?

Last edited by Joe Ross : 12-01-2011 at 20:42.
  #8   Spotlight this post!  
Unread 12-01-2011, 20:37
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,856
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: 2011 "Light Sensor"

NI has published a 2011 line tracking paper too.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #9   Spotlight this post!  
Unread 12-01-2011, 20:39
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: 2011 "Light Sensor"

Quote:
Originally Posted by Joe Ross View Post
Have you looked at the autonomous vi in the framework with game specific code?
Talking to me? No sir, I have not looked at anything 2011 programming related. Even with the last year's library, it would not be hard to make a basic line tracking software utilizing the camera. The NI vision library is very comprehensive, it has everything from edge detection to object and motion detection. They make it very easy for programmers to just get up and get going.


Quote:
Originally Posted by Charlie675 View Post
How do you follow the line with the camera? That sounds pretty awesome. You would probably have to go slow though because the camera's refresh rate is terrible.

I would have to disagree with you on that. If done correctly, the camera would be significantly faster than the line tracking hardware. The line trackers only see a "pixel" compared to the camera's capabilities. Using trigonometric functions and may be some probability, it would be easy to navigate over the line. The lines are not gonna go anywhere, the software can make decisions ahead of time.
__________________
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 : 12-01-2011 at 20:42.
  #10   Spotlight this post!  
Unread 12-01-2011, 21:17
Charlie675 Charlie675 is offline
Registered User
FRC #0675
 
Join Date: Jan 2010
Location: Sebastopol, CA
Posts: 7
Charlie675 is an unknown quantity at this point
Re: 2011 "Light Sensor"

Quote:
Using trigonometric functions and may be some probability, it would be easy to navigate over the line. The lines are not gonna go anywhere, the software can make decisions ahead of time.
If someone gets this to work effectively I have to see it.
  #11   Spotlight this post!  
Unread 12-01-2011, 21:20
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: 2011 "Light Sensor"

Quote:
Originally Posted by Charlie675 View Post
If someone gets this to work effectively I have to see it.
Now apparently our team flushed the whole idea of autonomous drive down the toilet. They do not trust me anymore. Last year our autonomous mode was absolutely hideous. It just barely worked and 90% of the it missed. Now long story short: the team captain comes to me literally the day before shipping "David I want you to get the autonomous to work" and then I see the IR sensor he installed in front of the kicker. So, I coded and debugged the autonomous code AT the competition... So that person might not be me. But certainly I will bring it up to my team that they indeed can trust me. I already got the drive working in 3 ways: linear, exponential and tank drive. They might even want a logarithmic one. Not hard at all can finish in 10 minutes. Now the autonomous might take a couple days, but sure check back with me next week.
__________________
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 : 12-01-2011 at 21:22.
  #12   Spotlight this post!  
Unread 12-01-2011, 21:40
mwtidd's Avatar
mwtidd mwtidd is offline
Registered User
AKA: mike
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2003
Location: Boston, MA
Posts: 714
mwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond repute
Re: 2011 "Light Sensor"

Quote:
Originally Posted by davidthefat View Post
Details por favor. I mean details on why you have that belief. I don't see why the line sensors would not be as efficient on a strafing bot than on a robot that can't. Is it because the strafing bot has to change its rotation of the motors(I think these are called crab drive) or reverse the motors (mecanium or omni) to strafe? The robot has to do those actions even with a camera.
no our chassis right now is all omni wheels, so we can strafe at no disadvantage. The camera returns the x,y and size of the traget, so for a strafing bot centering the target is easy, and then you just drive straight keeping the target in the center. For a nonstrafing bot you have to correct all the way to the target. Given I still think the camera is the best choice overall, line trackers will work almost equally well as the camera on a non strafing bot. On a strafing bot, I think the camera is the better choice.

Quote:
Originally Posted by Charlie675 View Post
How do you follow the line with the camera? That sounds pretty awesome. You would probably have to go slow though because the camera's refresh rate is terrible.
With the camera I look at the target not the lines. Where the refresh rate is not great, capping with the camera will be more accurate. Even their pretty slick line tracker in the video was jerking around quite a bit. If i was to attempt to cap with a line track I would require a gyro for it to be accurate(75% success rate is typically my bar) with the camera you do not need a gyro because you are looking right at the target.

I believe the average automated camera cap will be faster than a human cap, and more accurate than a line tracker cap.

Personally for this task I would rather use dead reckoning than use a line tracker. If you threw a gyro and a range finder on your robot, figured out the distance and said drive straight, I think you could make the 75% cut off for autonomous
__________________
"Never let your schooling interfere with your education" -Mark Twain

Last edited by mwtidd : 12-01-2011 at 21:47.
  #13   Spotlight this post!  
Unread 12-01-2011, 21:48
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: 2011 "Light Sensor"

Quote:
Originally Posted by lineskier View Post
no our chassis right now is all omni wheels, so we can strafe at no disadvantage. The camera returns the x,y and size of the traget, so for a strafing bot centering the target is easy, and then you just drive straight keeping the target in the center. For a nonstrafing bot you have to correct all the way to the target. Given I still think the camera is the best choice overall, line trackers will work almost equally well as the camera on a non strafing bot. On a strafing bot, I think the camera is the better choice.



With the camera I look at the target not the lines. Where the refresh rate is not great, capping with the camera will be more accurate. Even their pretty slick line tracker in the video was jerking around quite a bit. If i was to attempt to cap with a line track I would require a gyro for it to be accurate(75% success rate is typically my bar) with the camera you do not need a gyro because you are looking right at the target.

I believe the average automated camera cap will be faster than a human cap, and more accurate than a line tracker cap.
Oh! I totally misunderstood what you meant about camera tracking. I thought you meant tracking the line with the robot. But with your method, be careful to watch out for other robots and to not run into other robots... I know from experience, I was looking straight ahead and I did not see the bench right in front of me...
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
  #14   Spotlight this post!  
Unread 12-01-2011, 21:49
zbanks zbanks is offline
Registered User
AKA: Zach Banks
FRC #0529 (Mansfield Hornets)
Team Role: Leadership
 
Join Date: Feb 2010
Rookie Year: 2008
Location: MA
Posts: 37
zbanks is an unknown quantity at this point
Send a message via AIM to zbanks
Re: 2011 "Light Sensor"

To address the OP, the light sensors are pretty easy to use... almost too easy.

They're purely digital. If you power them, you can use the indicator LED to calibrate them. The knob sets the sensitivity, so you don't have to set it in code. Two of the wires are for power, the other two are output. One is normally-open, the other is normally-closed. You only have to wire up one: I'd suggest normally-open, but do whichever makes more sense for you.

Once its on your robot, you'll get a certain boolean value over light areas, and another over dark ones.

Theoretically, you only need one sensor to track a line. Dark: go left, Light: go right; you'll end up following the right edge of the line. With two, you could have them strattle the line and react accordingly, giving you a bit more hysteresis.

If your robot has an unconventional drive system, it will work on the same exact principle. I wouldn't think you would run into any additional problems unless your drive system itself fails.


Strangely enough, I think KISS might apply here. If you can calibrate your encoders correctly, I wouldn't be surprised if you could forgo the line sensors entirely. Encoders aren't sensitive to light/field conditions, and they're extremely simple to mount. Also, the lines on the field help so much: the two end lines put you in the middle of two columns of pegs & you'll have to maneuver a bit more anyways.
  #15   Spotlight this post!  
Unread 12-01-2011, 21:54
mwtidd's Avatar
mwtidd mwtidd is offline
Registered User
AKA: mike
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 2003
Location: Boston, MA
Posts: 714
mwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond reputemwtidd has a reputation beyond repute
Re: 2011 "Light Sensor"

Going back to 04, buzz robotics used a line tracker. Note they had 5+ sensors on the front of their robot. And in that game, accuracy was much less of a requirement, hence why line tracking was a good strategy.
__________________
"Never let your schooling interfere with your education" -Mark Twain
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


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

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