Go to Post adulthood is overrated. people just give you wierd looks when you play with your transformers, nerf guns and lightsabres. - Tytus Gerrish [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 07-03-2010, 11:54
garrettg garrettg is offline
Registered User
FRC #1528 (Monroe Trojan Robotics (formerly iPirates))
Team Role: College Student
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Monroe, MI, USA
Posts: 10
garrettg is an unknown quantity at this point
Autonomous runs during Teleop

Our team's robot will run in teleop just fine, and autonomous will work just fine too, but then it won't go back to teleop. It will say it's in teleop, but it is still moving like in autonomous. So, in the practice match on the DS, autonomous runs fine, then autonomous period ends and teleop period begins, but the driver has no control over the robot because it is still running in autonomous.

I am using autonomous independant, and all i changed in Begin.vi is replacing iteritive with independant.

Any ideas on why this is happening, and/or how to fix it?
Great appreciation in advance.
Reply With Quote
  #2   Spotlight this post!  
Unread 07-03-2010, 21:37
airnate airnate is offline
Registered User
FRC #0236 (Techno Ticks)
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2009
Location: southeastern CT
Posts: 93
airnate is a jewel in the roughairnate is a jewel in the roughairnate is a jewel in the rough
Re: Autonomous runs during Teleop

Any chance you can share code, either screen shots or actual VIs?
Reply With Quote
  #3   Spotlight this post!  
Unread 07-03-2010, 21:55
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: Autonomous runs during Teleop

If this is reproducible, PM me and I'd like to determine what the issue is.

Greg McKaskle
Reply With Quote
  #4   Spotlight this post!  
Unread 07-03-2010, 22:21
ideasrule's Avatar
ideasrule ideasrule is offline
Registered User
FRC #0610 (Coyotes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Toronto
Posts: 108
ideasrule is a jewel in the roughideasrule is a jewel in the roughideasrule is a jewel in the roughideasrule is a jewel in the rough
Re: Autonomous runs during Teleop

This may be a complete red herring, but I noticed in Java that an infinite loop in autonomous will continue running if teleop is enabled after autonomous is enabled.
Reply With Quote
  #5   Spotlight this post!  
Unread 07-03-2010, 23:11
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: Autonomous runs during Teleop

I've seen teams place calls to their autonomous code other places in the framework. I don't know why this happened, they either did it accidentally or thought it was better that way. Anyway, again, either post here or PM and we'll arrange to email.

Greg McKaskle
Reply With Quote
  #6   Spotlight this post!  
Unread 08-03-2010, 00:20
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Autonomous runs during Teleop

Using the LabVIEW framework, if autonomous independent exceeds 15 seconds, will it continue to execute when FMS changes to teleop?

Our LabVIEW programmer tells me "No", but I thought I recalled seeing something in the documentation warning that the answer is "Yes". Maybe I was reading the Java or C++ documents.


~
Reply With Quote
  #7   Spotlight this post!  
Unread 08-03-2010, 01:48
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: Autonomous runs during Teleop

Quote:
Originally Posted by Ether View Post
Using the LabVIEW framework, if autonomous independent exceeds 15 seconds, will it continue to execute when FMS changes to teleop?

Our LabVIEW programmer tells me "No", but I thought I recalled seeing something in the documentation warning that the answer is "Yes". Maybe I was reading the Java or C++ documents.
If you are running Autonomous Independent, the LabVIEW framework will stop your autonomous VI when the autonomous period ends, even if it's not done. I do not believe that Java or C++ will do this for you (when using the "SimpleRobot" framework).
Reply With Quote
  #8   Spotlight this post!  
Unread 08-03-2010, 08:00
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: Autonomous runs during Teleop

LV will abort the VI that imlements auto independent. If the VI calls into a .out that never returns, then it cannot be aborted, but it is unlikely that is happening.

Greg McKaskle
Reply With Quote
  #9   Spotlight this post!  
Unread 09-03-2010, 21:23
garrettg garrettg is offline
Registered User
FRC #1528 (Monroe Trojan Robotics (formerly iPirates))
Team Role: College Student
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Monroe, MI, USA
Posts: 10
garrettg is an unknown quantity at this point
Re: Autonomous runs during Teleop

Sorry about taking so long, but here's my autonomous.
It still stays in autonomous, but if I keep both the photosensor and the limit switch for the kicker returning true, it will go to teleop. Largest case strucure true will run once in autonomous, then once in teleop before finally relenquishing control to teleop. The best I can tell is it gets stuck in a loop, finishes early, and repeats autonomous again. Any ideas?

kickerlimit is a limit switch for the kicker, true means it's ready to kick
solenoid push true will kick
solenoid pull true will wind kicker
laser is a photosensor to tell if a ball is present
switcha and b are part of a 3-way switch for autonomous selection

Hope this is enough information.
Attached Files
File Type: vi Autonomous Independent.vi (50.8 KB, 39 views)
Reply With Quote
  #10   Spotlight this post!  
Unread 12-03-2010, 17:50
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Autonomous runs during Teleop

Quote:
Originally Posted by Ether View Post
Using the LabVIEW framework, if autonomous independent exceeds 15 seconds, will it continue to execute when FMS changes to teleop?

Our LabVIEW programmer tells me "No", but I thought I recalled seeing something in the documentation warning that the answer is "Yes". Maybe I was reading the Java or C++ documents.
Aha. I found it while sorting through a pile of papers:

"The Autonomous method will not quit running until it exits, so it will continue to run through the TeleOp period unless it finishes by the end of the Autonomous period."

The above excerpt is from Page 15 of a document dated 15 Sep 2008 in section "Built-in Robot Classes". I don't have the doc title or the link. I believe it may be the WPI Library tutorial.

Note: The LabVIEW Framework is different, or so I am told. It will abort the Autonomous independent when the 15 seconds expires.


~

Last edited by Ether : 12-03-2010 at 17:52.
Reply With Quote
  #11   Spotlight this post!  
Unread 13-03-2010, 21:25
garrettg garrettg is offline
Registered User
FRC #1528 (Monroe Trojan Robotics (formerly iPirates))
Team Role: College Student
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Monroe, MI, USA
Posts: 10
garrettg is an unknown quantity at this point
Re: Autonomous runs during Teleop

I got the problem resolved right after qualification matches today (I know, it's late) and the problem was it was hanging in a while loop, and it didn't want to kick out. With the help of Matt from team 2619, we added a tick count, and used that to kill the while loops. Now, if executed just right, autonomous will not give the user control for (up to) the first 8-ish seconds, but the team is OK with that for right now. Too bad chain keeps popping off and our wheel brackets are bending...
Reply With Quote
  #12   Spotlight this post!  
Unread 14-03-2010, 01:17
Zme Zme is offline
Registered User
FRC #2619
 
Join Date: Jan 2009
Location: Michigan
Posts: 83
Zme is on a distinguished road
Re: Autonomous runs during Teleop

since i was mentioned i thought i should write in and describe what we did for teams that could be having a similar issue

in the beginning of the autonomous independent (before any loops) we got the tick count (in ms) and added 14500 to it, then inside of each loop it would get the tick count and compare it to that, if it was greater than it then the exit condition became true and it went on with the show, the extra 8 seconds there is being used up by the setup they used for autonomous (they have some wait commands in there and it has to cycle through all of the iterations before it will exit.)

It is a really roundabout way of doing things thought, any chance that for next year the labview side of things could get a IsOperatorControl() function so that it could be used to exit out of the loops if it switches over to teleop? i know it has saved our team more than once with runaway code
Reply With Quote
  #13   Spotlight this post!  
Unread 14-03-2010, 01:32
Racer26 Racer26 is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Apr 2003
Rookie Year: 2003
Location: Beaverton, ON
Posts: 2,229
Racer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond reputeRacer26 has a reputation beyond repute
Re: Autonomous runs during Teleop

I know the C++ flavour of WPILib has IsAutonomous() and IsOperatorControl()... theres no LabVIEW equivalent?
Reply With Quote
  #14   Spotlight this post!  
Unread 14-03-2010, 01:42
Zme Zme is offline
Registered User
FRC #2619
 
Join Date: Jan 2009
Location: Michigan
Posts: 83
Zme is on a distinguished road
Re: Autonomous runs during Teleop

not one that i can easily find (mind you we used c++ for our robot)

there are some that we can find but the issue is that they require inputs to work correctly which means that they need constantly updated inputs which can be tricky with the autonomous independent because it is only called once
Reply With Quote
  #15   Spotlight this post!  
Unread 14-03-2010, 09:03
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Autonomous runs during Teleop

Quote:
Originally Posted by Zme View Post
since i was mentioned i thought i should write in and describe what we did for teams that could be having a similar issue

in the beginning of the autonomous independent (before any loops) we got the tick count (in ms) and added 14500 to it, then inside of each loop it would get the tick count and compare it to that, if it was greater than it then the exit condition became true and it went on with the show, the extra 8 seconds there is being used up by the setup they used for autonomous (they have some wait commands in there and it has to cycle through all of the iterations before it will exit.)

It is a really roundabout way of doing things thought, any chance that for next year the labview side of things could get a IsOperatorControl() function so that it could be used to exit out of the loops if it switches over to teleop? i know it has saved our team more than once with runaway code
You didn't say what language you are using.

As mentioned earlier in this thread, the LabVIEW framework automatically terminates autonomous independent when teleop is commanded.

Since you are adding code to exit from autonomous when time is up, I assume you are using C or Java.

If such is the case, why don't you break out of the code immediately when the tick count reaches the target, rather than letting the code "cycle through all of the iterations before it will exit" ?


~
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Directions During Autonomous helenajoy NI LabVIEW 2 22-02-2010 19:30
HELP!!!! we need help w/ compressors/pneumatics for teleop/autonomous in LABVIEW rokenboker NI LabVIEW 9 05-02-2010 17:10
Scoring During Autonomous Mode KrakatoaCoo Rules/Strategy 7 15-01-2010 16:16
Labview Autonomous AND Teleop Two-Face Programming 1 14-02-2009 18:33
No Tracking During Autonomous jdejoannis Programming 4 10-02-2007 14:46


All times are GMT -5. The time now is 22:04.

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