We’re trying to figure out if our competition code is configured correctly. We tried to run the autonomous, but nothing happened. Are we missing something or did we configure something wrong? Can someone take a look at the auton and driver templates and give some feedback? Greatly appreciated!
Another issue we ran into is the forward and reverse controls seem to be backwards.
The driver control block is sort of nasty looking. It needs to be redone. Just put a forever loop in there and your movement components into it.
As far as the auton… it looks more or less corrrect. I have seen ‘bad’ code from one area (driver control) mess up another area (auton).
Also, sometimes blocks just messes up. You might try to drop JUST the auto code into a new program and try it.
-
I have to ask if you ran a “timed run” or “autonomous skills competition” through the interface on the remote. If you did not, then the autonomous portion of you code would not be triggered. (I guess you could also use a competition switch if you have one)
-
I agree that you probably want to clean up that driver control, but that is a separate issue.
-
I assume that this is for a simple auton that tries to push a triball under the goal and then backs away. You probably want to move that motor timeout block so that it is before the first drive block. As it is, it will only affect the second drive block and your code may freeze trying to get your robot to 24" and never back up.
go to the drivetrain look at the arrows and switch it that should fix you forward backward problem.
For your driver control period. I would suggest using when pressed commands. Not when driver control. EX) do When L1 Pressed do whatever. Instead of just having a long chain. Also on the page where you can edit the controller device. By clicking on the joysticks it can automatically set your drivetrain controls.
Is this what your talking about. Put a forever loop and my components beneath it? Do I need to add which buttons to press?
Yep, I think we did use the “timed run” instead of the “autonomous skills competition”. I switched the motor timeout block. Checkout my second screenshot.
Here is our controller and drivetrain set-up.
The problem we are having.
Reverse and forward are backwards. We tried switching in the controller and drive train. Did not help any.
I don’t mess with drivetrain much, but about the only way it could be backwards is
- your front/back are swapped in the config
- your motor groups are backwards
Yeah. You are going to need some if statements in there about button presses/controller sticks/etc. But they can ALL be inside the forever loop. FWIW, I’ve seen issues with using ‘when pressed’ blocks… too many of them and I’ve seen code not work reliably.
There’s a limit for simultaneously running events on IQ, it’s a bit higher on IQ generation 2. There’s no limit for V5.
We are using VEX v5.
+1 on the competition switch. Using the auton timer method from the controller causes you to lose ~2 seconds from your run.
You mentioned the motor groups could be backwards. The left and right controller works fine, just the forward and reverse is backwards. We’ll go back and add the “if” blocks. Since our last competition we switched from a 2 drivetrain to a 4 drivetrain. It’s a little confusing when trying to program it, since we are new to coding.
why do you say that ?
The program is started at the beginning of the 3 second countdown, plenty of time for IMU etc. to initialize.
That’s what we have experienced. The ‘controller’ method with a countdown & rumble is ~2 seconds less than the field switch method. It’s been a few years since using the controller method… been using switch since ~3 years ago. I will double check and make sure.
Originally it was that way, we changed operation 2 or 3 years ago, I forget exactly when.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.