For the autonomous mode, our team was looking at putting a manual switch on the robot that we could flip before the match after discussing with our alliance partners about what starting position we would be in.
what would be the best way to do this?
what kind of a switch would we use?
where would we plug it in?
and would it be possible to flip the switch before the match, before the robot is turned on, and have labview read the value or would the program zero out the current position?
The best way to do it would be to utilized the disabled area in your programming and feed back onto your driver station. Your joysticks work just fine in disabled - the only thing not working is the motor outputs.
Therefore you can use the buttons on your joysticks to select your auton after you power everything up, from your driver station.
You have a number of digital inputs available on the side car in the robot. You can wire switches to these inputs and the robot will read them reliably all of the time. You can also use inputs at the driver’s station, but these inputs will be adversely affected during autonomous. You have to read and save the values during the disabled period before autonomous is started for later use during autonomous. In past years one has had to be very careful about how you read switches prior to autonomous, to make sure that you get correct values.
A set of switches on the side car will get the job done. Since there is no interaction in auton, there’s no reason you need to wait until your opponents place robots to decide your autonomous mode, the main reason to put the switches on the DS.
You can use a simple binary system to get 2^x auto modes with x switches. Or if you want to configure something in your auto mode, you can use a few switches to set a value from, say, 0 to 15. No idea why you’d want to do THAT though…
we used this last year for lunacy we had the switch being the right wheel on the joystick
<30 = near starting
>30 and <70 = middle
>70 = far
So it sounds as though there is a time before autonomous mode begins where you can set the throttle on the joystick without it being zeroed out, am i correct?
Where is there more details on the beginning, “disabled” time, and autonomous mode in the FRC Rules? I searched quite a while and could only find rule <G02> which just states that: “The AUTONOMOUS PERIOD is the 15-second period at the start of the MATCH. DRIVER control of the ROBOT is not permitted at this time. During this period, the ROBOTS may react only to sensor inputs and commands programmed into the onboard control system.”
The period we’re talking about isn’t an official in-the-rules period of time. After you set your robot up on the field, get your driver station plugged in, and get it all powered up, you’ll be running any code that you put in the “disabled” VI (if you’re using labview. C++ and Java have equivalents).
This means that you’ll have 30 seconds to a minute where everything is powered up and running when you can set your mode.
Okay i read the other post, and i think i understand a decent amount of it but i feel like i missed some of the concepts as well.
I am part of a rookie team and haven’t had much experience so this is al a bit of a trial by fire.
When you say:
Namely, the Joystick (and other) values from the drivers station are not “zeroed out” but rather, latched just before going into Autonomous Enabled.
What exactly does that mean? And more practically, does that still allow me to, before the match starts and while setting up the DS, turn the throttle knob on the joystick, and then have it affect how the code runs when Auton begins?