Go to Post They can either incorporate the suggestions in this thread, go totally against them, or even make us all write code on banana peels with our fingernails. - Andy Baker [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 29-01-2011, 19:19
wazcodez's Avatar
wazcodez wazcodez is offline
Registered User
AKA: Megh Suthar
FRC #2076 (Blackscots)
Team Role: Programmer
 
Join Date: Oct 2010
Rookie Year: 2008
Location: Toronto
Posts: 19
wazcodez is infamous around these partswazcodez is infamous around these parts
Send a message via MSN to wazcodez
Rookie + errors = fail()

we are having way too much trouble in programming line trackers ????

we tried everything .... first only left motor spins while right one is at sleep and then at last two seconds both of them spins at the opposite direction,

please see included pictures

and thanks
__________________
" When you copy from one source it's called plagiarism when u copy from multiple it's Research .. ! " - Megh Suthar
Reply With Quote
  #2   Spotlight this post!  
Unread 29-01-2011, 19:43
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Rookie + errors = fail()

For more detail behind why the code was written that way, you may want to review the tutorial at http://decibel.ni.com/content/commun...#/?tagSet=1001 in the lower right. It is the one about line following.

To directly answer your questions. The lists of numbers are an array of power values. These are used to vary the speed of the robot for different parts of the line. Generally, the idea is to go pretty fast at the beginning, slow down for any curves and for the T at the end of the line. Since the default code cannot assume a distance encoder, the power array is indexed using elapsed time.

The one labeled Straight Power is used for the straight line, and the Y power is used with following either the left or right of the line with the Y fork.

The steering gain determines how much the robot steers to the left or right. Since the line sensors return a Boolean signal, the robot has four basic responses -- go left, go right, go straight, or stop. As the steering gain is made larger, the robot will steer more sharply and "bounce" from side to side, over-correcting. As the number is reduced closer to zero, the robot will steer more gently and at some point will under-correct.

My advice would be to focus on the teleop first. Use either the arcade or tank drive and think through the issues until you have forward, backward, left steer and right steer working correctly. At that point, you should be able to tune the auto. If you have more issues, post questions here.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 30-01-2011, 17:52
wazcodez's Avatar
wazcodez wazcodez is offline
Registered User
AKA: Megh Suthar
FRC #2076 (Blackscots)
Team Role: Programmer
 
Join Date: Oct 2010
Rookie Year: 2008
Location: Toronto
Posts: 19
wazcodez is infamous around these partswazcodez is infamous around these parts
Send a message via MSN to wazcodez
Re: Rookie + errors = fail()

Quote:
Originally Posted by Greg McKaskle View Post
For more detail behind why the code was written that way, you may want to review the tutorial at http://decibel.ni.com/content/commun...#/?tagSet=1001 in the lower right. It is the one about line following.

To directly answer your questions. The lists of numbers are an array of power values. These are used to vary the speed of the robot for different parts of the line. Generally, the idea is to go pretty fast at the beginning, slow down for any curves and for the T at the end of the line. Since the default code cannot assume a distance encoder, the power array is indexed using elapsed time.

The one labeled Straight Power is used for the straight line, and the Y power is used with following either the left or right of the line with the Y fork.

The steering gain determines how much the robot steers to the left or right. Since the line sensors return a Boolean signal, the robot has four basic responses -- go left, go right, go straight, or stop. As the steering gain is made larger, the robot will steer more sharply and "bounce" from side to side, over-correcting. As the number is reduced closer to zero, the robot will steer more gently and at some point will under-correct.

My advice would be to focus on the teleop first. Use either the arcade or tank drive and think through the issues until you have forward, backward, left steer and right steer working correctly. At that point, you should be able to tune the auto. If you have more issues, post questions here.

Greg McKaskle
Tele op works perfectly ! we managed to code it for acrade drive and it's perfect as it could be ! but the weird part is that why would two wheels spins in opposite direction from beginning, we did put reflective tape on left side of the sensor

when we tried on the ground, robot went straight sometimes and sometimes it instantly took left turn (always left).

and also now we are getting errors tht

loop that contains robot Drive is not running fast enough !

thanks for your help, will try different setting on monday !

Megh Suthar
__________________
" When you copy from one source it's called plagiarism when u copy from multiple it's Research .. ! " - Megh Suthar
Reply With Quote
  #4   Spotlight this post!  
Unread 30-01-2011, 19:07
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: Rookie + errors = fail()

Quote:
Originally Posted by wazcodez View Post
...we did put reflective tape on left side of the sensor
Can you elaborate on that? What did you expect putting the tape there to do, and how did you expect it to do it? When you say "on left side", do you mean actually sticking the tape to the sensor housing, or sticking the tape to something next to the sensor? Or is the sensor looking left at the reflective tape?

My big question is this: why are you using reflective tape at all?
Reply With Quote
  #5   Spotlight this post!  
Unread 30-01-2011, 19:11
Ethan Spitz Ethan Spitz is offline
President
FRC #3637 (The Daleks)
Team Role: Leadership
 
Join Date: Feb 2009
Rookie Year: 2011
Location: New Jersey
Posts: 133
Ethan Spitz is an unknown quantity at this point
Re: Rookie + errors = fail()

You're supposed to use a certain gray gaffers tape. The reflective tape is for the pegs

Regarding how it is turning always left, its definitely code related, could I see your code?

Ethan
__________________
www.team3637.com FIRST team 3637's Website: The Daleks
Reply With Quote
  #6   Spotlight this post!  
Unread 31-01-2011, 23:41
WizenedEE's Avatar
WizenedEE WizenedEE is offline
Registered User
AKA: Adam
FRC #3238 (Cyborg Ferrets)
Team Role: Leadership
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Anacortes, WA
Posts: 395
WizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to allWizenedEE is a name known to all
Re: Rookie + errors = fail()

Did you calibrate your line tracker sensors? Our team is having problems with those.
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 21:20.

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