Go to Post FRC isn't for every school; it takes a lot of drive just to fundraise every year. It is a premium program that requires a premium about of effort to sustain and be successful. And man is it fun to do. - JesseK [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 20-03-2011, 20:07
jhellr13 jhellr13 is offline
Registered User
FRC #4272
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Line Follow in Teleop

I recently saw the video from team 1678 that shows them pressing a button, and the robot drives forward, finds the line, and drives to the T. I have been thinking about it, and am wondering how they did it. I think that you just need to take the line following code from the autonomous vi, and put it in a case structure in the teleop vi. Does this sound correct? I'm wondering if they changed anything in order to make it drive straight to the line, rather than spin in circles.
I'm not looking to steal their code and awesome work. I just think this could be of some help to our team, and would like to know how they did it.
Reply With Quote
  #2   Spotlight this post!  
Unread 20-03-2011, 20:22
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: Line Follow in Teleop

That sounds exactly what I'd do.

Of course, if you were using the "independent" autonomous, you'd have to change it to "iterative" so that robot main keeps looping. You'd also have to figure out a way to turn it off, although a simple toggle switch for either on or off would work nicely.

And assuming that your normal autonomous doesn't turn in circles, I don't see why the same code in teleop would.
Reply With Quote
  #3   Spotlight this post!  
Unread 20-03-2011, 20:53
jhellr13 jhellr13 is offline
Registered User
FRC #4272
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Re: Line Follow in Teleop

Quote:
Originally Posted by WizenedEE View Post
That sounds exactly what I'd do.

Of course, if you were using the "independent" autonomous, you'd have to change it to "iterative" so that robot main keeps looping. You'd also have to figure out a way to turn it off, although a simple toggle switch for either on or off would work nicely.

And assuming that your normal autonomous doesn't turn in circles, I don't see why the same code in teleop would.
What do you mean by making it iterative? Also, why would i want to toggle it off? The line following code ends at the T
Reply With Quote
  #4   Spotlight this post!  
Unread 20-03-2011, 21:33
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: Line Follow in Teleop

last year they had it so that you could use autonomous "independent" or "iterative" so I keep using those terms..

Basically, independent means it gets called once, so you have your own loops inside of it, and iterative means it has a while loop around it, just like teleop.
Reply With Quote
  #5   Spotlight this post!  
Unread 20-03-2011, 21:37
jhellr13 jhellr13 is offline
Registered User
FRC #4272
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Re: Line Follow in Teleop

Quote:
Originally Posted by WizenedEE View Post
last year they had it so that you could use autonomous "independent" or "iterative" so I keep using those terms..

Basically, independent means it gets called once, so you have your own loops inside of it, and iterative means it has a while loop around it, just like teleop.
I was just gonna copy the line following code from the standard autonomous independent vi, and put it in a case structure attached to a button. What do you think of that?
Reply With Quote
  #6   Spotlight this post!  
Unread 20-03-2011, 21:46
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: Line Follow in Teleop

Whatever code in autonomous works should work in teleop. Remember to raise the arm though.
Reply With Quote
  #7   Spotlight this post!  
Unread 20-03-2011, 21:49
jhellr13 jhellr13 is offline
Registered User
FRC #4272
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Re: Line Follow in Teleop

Quote:
Originally Posted by WizenedEE View Post
Whatever code in autonomous works should work in teleop.
So do i need to make it iterative, or can i just do what i said before? I'm sorry i keep asking, but it is confusing. I'm a labview newbie
Reply With Quote
  #8   Spotlight this post!  
Unread 20-03-2011, 22:16
Cuyir Cuyir is offline
Registered User
FRC #0067 (The HOT Team)
Team Role: Programmer
 
Join Date: Apr 2010
Rookie Year: 2010
Location: Michigan
Posts: 7
Cuyir is an unknown quantity at this point
Re: Line Follow in Teleop

Without seeing anything, I would think your auton code should just fine based on a button press in teleop, if you aren't using any loops in that auton code. If you are, then you'll need to rewrite line-tracking to take into account the while loop that encompasses all of teleop.
Reply With Quote
  #9   Spotlight this post!  
Unread 20-03-2011, 22:20
jhellr13 jhellr13 is offline
Registered User
FRC #4272
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Re: Line Follow in Teleop

Quote:
Originally Posted by Cuyir View Post
Without seeing anything, I would think your auton code should just fine based on a button press in teleop, if you aren't using any loops in that auton code. If you are, then you'll need to rewrite line-tracking to take into account the while loop that encompasses all of teleop.
It would just be the line following code from the autonomous vi without any changes done. I think it is all inside one large while loop
Reply With Quote
  #10   Spotlight this post!  
Unread 21-03-2011, 01:42
KaiserTom KaiserTom is offline
Registered User
FRC #3574
 
Join Date: Mar 2011
Location: Burien
Posts: 1
KaiserTom is an unknown quantity at this point
Re: Line Follow in Teleop

I would keep the while loop and just have it be in a case structure that only executes it when the button is pressed and then have another button inside that while loop connected to the loop stop in case the robot happens to go off course during a match or you need to do something else, like say deploy a mini-bot, you don't want to be stuck hanging a tube worth at most 6 points vs a minibot worth AT MINIMUM 10 do you?


I wouldn't rely on the E-Stop to stop it since that requires a hard reset, at least in my teams experience, which is a little too over-excessive IMO.

But be aware it will only work for the middle pegs on the straight and the left halve right column and right halve left column for the Y. You will still have to manually control it for the other columns.
Reply With Quote
  #11   Spotlight this post!  
Unread 21-03-2011, 06:36
jhellr13 jhellr13 is offline
Registered User
FRC #4272
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: US
Posts: 187
jhellr13 is an unknown quantity at this point
Re: Line Follow in Teleop

Quote:
Originally Posted by KaiserTom View Post
I would keep the while loop and just have it be in a case structure that only executes it when the button is pressed and then have another button inside that while loop connected to the loop stop in case the robot happens to go off course during a match or you need to do something else, like say deploy a mini-bot, you don't want to be stuck hanging a tube worth at most 6 points vs a minibot worth AT MINIMUM 10 do you?


I wouldn't rely on the E-Stop to stop it since that requires a hard reset, at least in my teams experience, which is a little too over-excessive IMO.

But be aware it will only work for the middle pegs on the straight and the left halve right column and right halve left column for the Y. You will still have to manually control it for the other columns.
That is pretty much how i put it in the code. I didn't even think of an off button though, so I should probably do that. Thanks
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 20:45.

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