Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Line Follow in Teleop (http://www.chiefdelphi.com/forums/showthread.php?t=93826)

jhellr13 20-03-2011 20:07

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.

WizenedEE 20-03-2011 20:22

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.

jhellr13 20-03-2011 20:53

Re: Line Follow in Teleop
 
Quote:

Originally Posted by WizenedEE (Post 1042794)
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

WizenedEE 20-03-2011 21:33

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.

jhellr13 20-03-2011 21:37

Re: Line Follow in Teleop
 
Quote:

Originally Posted by WizenedEE (Post 1042869)
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?

WizenedEE 20-03-2011 21:46

Re: Line Follow in Teleop
 
Whatever code in autonomous works should work in teleop. Remember to raise the arm though.

jhellr13 20-03-2011 21:49

Re: Line Follow in Teleop
 
Quote:

Originally Posted by WizenedEE (Post 1042888)
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

Cuyir 20-03-2011 22:16

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.

jhellr13 20-03-2011 22:20

Re: Line Follow in Teleop
 
Quote:

Originally Posted by Cuyir (Post 1042908)
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

KaiserTom 21-03-2011 01:42

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.

jhellr13 21-03-2011 06:36

Re: Line Follow in Teleop
 
Quote:

Originally Posted by KaiserTom (Post 1042990)
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


All times are GMT -5. The time now is 09:32.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi