Autonomous & Teleop Switch Issues

For the 2014 Aerial Assist, I am one of a few on the team programming the robot via Labview.

My issue is this: I have the autonomous independent doing what I require it to (technically, I don’t, but what is in it will last exactly ten seconds and does move the robot) and I have teleoperation setup in arcade drive (working quite well). What happens is this: I enable autonomous mode in the FRC driver station. I let it run for ten seconds (if the code within auto executes in less that 10 seconds, it restarts auto). I then switch to teleoperation enabled. Here is the issue: it runs auto once more from its beginning when I enable teleop, and then after it has finished, it will allow me to use the joystick to control movement.

I need that to stop. If I can’t get it to not re-execute autonomous, I will be incapable of earning points within the autonomous period and the robot could potentially damage another one when it reruns auto.

Any suggestions will be thoroughly tested. Thanks beforehand for the help.

NOTE: I couldn’t get WPI_DriverStationStartStop.vi to successfully start autonomous independent.vi. I had to put autonomous independent.vi directly in the “Auto Enabled” State in robot main.

NOTE: Here is a youtube video of the problem: http://www.youtube.com/watch?v=aYNJ0...e_gdata_player

robot main.vi and autonomous independent.vi and teleop.vi are attached.

Autonomous Independent.vi (43.7 KB)
Robot Main.vi (23.5 KB)
Teleop.vi (37.9 KB)


Autonomous Independent.vi (43.7 KB)
Robot Main.vi (23.5 KB)
Teleop.vi (37.9 KB)

I’am replying from a mobile device so I’ll have to look atyour code later but i would guess the problem to be having auton in the auto enabled case of main. I would check to see if you can get wpi_driverstationstartstop.vi to work. Whats probably happening is that the driver sation is unable to force stop auton when it is in the auto case of main.

Hope this was helpfull, I’ll look at your video after school so i can see what exacly is happening.

Thanks for the quick response! I’ve run several different setups of WPI_DrverStationStartStopVI.vi without any success.

You’ve removed the vi that stops Autonomous at the end of Autonomous Mode.
You really should not have modified Robot Main at all.
What Robot Main used to do was to run Autonomous Independent only once, and if it was still running when Teleop started it would kill it, so your driver could take control.

That sequence that you added to your Teleop will also cause your robot to lock up while the sequence is running, and it’s trying to order the drive motors to do conflicting things at the same time.
If you want a sequence that takes time as that one does, it will need to be worked into Periodic Tasks rather than Teleop, and you will need to come up with a way to prevent the driver commands in Teleop from countermanding your orders during the sequence.

Autonomous itself looks okay.

On the sequence for button 3 within Teleop: i know that it stops input until it finishes. I havent removed it because i havent felt like it, Though i will before the competition.
And thanks for pointing the main edits out: I’ll compare my robot main with an older version to see if i can fix it, though if my memory Is correct, it was originally the WPI_DriverStationStartStopVI.vi with call context and the link to auto.vi connected to it (in the auto enabled case). And auto never ran for me with that setup.

If you have trouble getting Autonomous to start in the regular arrangement let us know what the trouble is and we’ll help you through it.

So the original setup was as i said for the “auto enabled” case in main. And that setup does not work. I enable auto and no matter what is in auto.vi, it just sits. Any thoughts?

So, you are selecting Autonomous on the Driver Station, then Enabling the robot?

If you’ve made a lot of changes then it might be best to debug the problem by creating a new robot project and copy/paste your Auto code into Autonomous Independent.
One of the simple tests you can do is to simply make some of the status lights blink in Autonomous, like this:

Let’s look at Your current Robot Main first.
Does it now look like this:

RobotMain.jpg


RobotMain.jpg

It does. I’ve tried that setup 5 or 6 times. Unfortunately, the next time I’ll be near the robot is tomorrow morning. I’ll try it out again then.
And yes, that is what i am doing.

Fixed. The issue was, well, probably my edits. It works with that setup now in the new project even though it still doesnt work in the other project with it being manually setup like that. Thanks for the help all!