|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
Re: Autonomous runs during Teleop
Any chance you can share code, either screen shots or actual VIs?
|
|
#3
|
|||
|
|||
|
Re: Autonomous runs during Teleop
If this is reproducible, PM me and I'd like to determine what the issue is.
Greg McKaskle |
|
#4
|
||||
|
||||
|
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.
|
|
#5
|
|||
|
|||
|
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 |
|
#6
|
||||
|
||||
|
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. ~ |
|
#7
|
|||
|
|||
|
Re: Autonomous runs during Teleop
Quote:
|
|
#8
|
|||
|
|||
|
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 |
|
#9
|
|||
|
|||
|
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. |
|
#10
|
||||
|
||||
|
Re: Autonomous runs during Teleop
Quote:
"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. |
|
#11
|
|||
|
|||
|
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...
![]() |
|
#12
|
|||
|
|||
|
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 |
|
#13
|
|||
|
|||
|
Re: Autonomous runs during Teleop
I know the C++ flavour of WPILib has IsAutonomous() and IsOperatorControl()... theres no LabVIEW equivalent?
|
|
#14
|
|||
|
|||
|
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 |
|
#15
|
||||
|
||||
|
Re: Autonomous runs during Teleop
Quote:
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" ? ~ |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |