Pre-Autonomous OI Communication

I just came from the FIRST forums and I know this question has been asked, but I’ve been unable to find the answer. Has it been answered? In case you don’t know the quesiton, it is this: does data from the OI get transmitted to the RC before the autonomous phase begins? A post from FIRST strongly indicates this is the case, but I’ve never seen it explicitly stated. If someone could direct me to the FIRST forum post where it’s answered, I’d be very happy… I don’t want to commit to designing an AI selector switch just to have it not work :stuck_out_tongue: Thanks.

I’ve seen several posts that say that you can’t select a program based on human controls, it must be on the robot, here is one example :
http://jive.ilearning.com/thread.jsp?forum=2&thread=83&message=2493#2493

What message are you refering to when you say that they left it ambiguous?

I agree that the post you linked to did seem rather explicit in its declaration that we’re not allowed to select programs after we put the bot down, but I wonder if it was in reference to a control that is physically on the robot? The post that I was originally reffering to is this: http://jive.ilearning.com/thread.jsp?forum=3&thread=1014&tstart=15&trange=15

If the control is on the robot, it will be read just like every other sensor/switch on the RC. Therefore, the first time through your autonomous mode loop, just check the value and run the appropriate program.

Perhaps I’m just all confused and warped, but I think I’m not getting my message across. My goal is to have a big button on our operator interface system that lets us select the AI mode prior to the beginning of the match. I’d much prefer that to a knob on the robot.

Even if there is a way to use a switch on the OI to select a program, it would seem to violate the intent of the rules regarding autonomous mode. See section 7.3 of the game section.

It’s not any harder to do a switch on the robot (just a little less convienent), which is why Rob was suggesting that, because that doesn’t violate the intent of the rules (and was even suggested at kickoff).

If you search the forums, you will find several threads about possible “loopholes” in the autonomous mode. You could try implementing these, or you could ask FIRST for clarification about whether exploiting something like that is legal. Nobody knows if these will work at the competition, though, so it’s just speculation. So, if you really want to know, make a switch on the OI, and be prepared for it to not work at the competition.

sigh I don’t believe it violates the spirit of the rules any more than a knob on the robot. I’m not communicating with the bot during the autonomous phase, as some others have suggested via the e-stop, etc. It’s just a mode select button. Think of it as pushing the launch button on an interstellar probe… after you set the launch parameters, it’s gone off on it’s own :stuck_out_tongue: (I realize that’s not 100% a great metaphor, but I’m thinkin’ on my feet here!)

Ryan,

Remember, when in autonomous mode, the system is DESIGNED to not allow input from the operator interface (OI) to the robot controller (RC). Your mode select button would be connected to the OI, so the robot would know nothing of that switch state until the autonomous phase is over.

Now, it’s conceivable that FIRST’s competition control system might not turn on autonomous mode until the very beginning of the autonomous phase, when the robot is un-disabled. This would mean that even though the robot is disabled, it would be receiving all the OI inputs, and COULD respond to a mode select button when the autonomous phase starts.

Note that when your robot is disabled, it is not brain dead. It is just paralysed. That is, the master microprocessor in the RC refuses to act upon any commands from your user program.

I’m about ready to stop beating this dead horse. Let me try this as an outline:

  • I am a very competent programmer - most importantly for this task, I know how to make a state machine

  • I realize that when autonomous, the OI sends dummy data that represents all switches off and all joysticks centered

  • I can make my state machine switch to the correct state based on user input BEFORE autonomous mode begins, assuming it isn’t already on when we plug in our control system

  • I know that disabled mode merely renders inactive the outputs - I use it a lot for debugging stuff without having the robot run across the floor and kill innocent freshmen :stuck_out_tongue:

  • Nothing I have suggested or intended involves the transmission of data during the autonomous phase

Can I make a switch on my OI to select an appropriate AI? “Can” assumes a) it’s possible and, b) it’s allowed by the rules.

*Originally posted by Ryan Meador *
**Can I make a switch on my OI to select an appropriate AI? “Can” assumes a) it’s possible and, b) it’s allowed by the rules. **

The answer is YES! (UNLESS you are planning on making the selection AFTER you are connected to the competition control system. Since you aren’t allowed to use wireless communications except during a match, that implies that your robot will be tethered to your OI.)

This is the same as one of the methods I was considering using to select autonomous programs for our robot.

For those of you still discussing this topic:

I talked with Innovation first on 1/21/02. Here is my understanding of the sequence that the PBasic program can see during each phase of competition.

STANDBY PERIOD: (power on RC and OI)
comp_mode = High
auton_mode = Low
Robot Controller Analog Outputs = 127
Robot Controller Digital Outputs = 0
Operator Interface Analog Inputs = 127
Operator Interface Digital Inputs = 0

AUTONOMOUS PERIOD:
comp_mode = High
auton_mode = High
Robot Controller Analog Outputs = Program Control
Robot Controller Digital Outputs = Program Control
Operator Interface Analog Inputs = 127
Operator Interface Digital Inputs = 0

OPERATOR PERIOD:
comp_mode = High
auton_mode = Low
Robot Controller Analog Outputs = Program Control
Robot Controller Digital Outputs = Program Control
Operator Interface Analog Inputs = Operator Control
Operator Interface Digital Inputs = Operator Control

I hope this will help

Tim Tedrow

Now if you are a really good programmer, you could use the reset button on the operator interface to cycle through your autonomous program selection.

How?

In the initialization section outside of the main loop, you read and increment a number then write it back to eeprom. This number would be used to select the autonomous program to run. Then you could use the LEDs on the Operator Interface to indicate with program you have selected. But be careful, you may not have enough time to cycle through all of your programs in the 1 minute setup time.

Have some fun with this one. Let us know if it works

Tim Tedrow

How about using a simple multi-position rotary switch on the robot?

Safer than combinations of toggle switches, etc…

*Originally posted by ttedrow *
In the initialization section outside of the main loop, you read and increment a number then write it back to eeprom.

Are you sure the e-stop resets the robot? If not, then the initialization section will not get rerun.

Originally posted by Mike Rozar
**How about using a simple multi-position rotary switch on the robot?

Safer than combinations of toggle switches, etc…**

One of the problems I foresee is that for the digital inputs on the RC, we’re warned not to apply any voltage to the switch pins, and to just ground them to return 1. “All additional electronics must draw power from a 20A circuit breaker,” (The_Robot.pdf, page 13, emphasis added by me).

I’m not sure if this means that just attaching a few switches to the digital input pins of the RC is illegal, but unless it’s already been clarified, and I just haven’t seen it, I’m fairly certain that this rule could become very important.

I might just be delusional, at this time of night. Don’t mind me if I just sound dumb. It’s probably normal…

*Originally posted by gwross *
**Are you sure the e-stop resets the robot? If not, then the initialization section will not get rerun. **

I believe he’s referring to the Robot Reset button on the OI, not the E-Stop button at the player station.

I’m fairly certain that he’s correct in his assessment of the situation, and what he’s saying does make sense to me. However convoluted a method it is, it probably works.

Tim, I’m glad there’s at least one other person here that can comprehend what I’m saying. Thank you very much. I believe I’ve now ruled that out as a possibility :stuck_out_tongue: But we’ve still got our external circuit (with rotary switch, of course). To make the rotary switch work, just connect it to ground like the rules state… I see no conflict or need for breakers, etc, as FotoPlasma suggested.

Greg,

Not the E-Stop but the Robot Reset button on the Operator Interface.

Tim Tedrow

Ryan,

You are 100% correct, Rotary switch, Toggle switch or Limit switch they are all 1’s and 0’s to PBasic.

Tim Tedrow

*Originally posted by ttedrow *
Not the E-Stop but the Robot Reset button on the Operator Interface.

Sorry. I didn’t read carefully, and I got confused by Ryan’s earlier reference to another thread concerning the e-stop button.

One of the problems I foresee is that for the digital inputs on the RC, we’re warned not to apply any voltage to the switch pins, and to just ground them to return 1. “All additional electronics must draw power from a 20A circuit breaker,” (The_Robot.pdf, page 13, emphasis added by me).

the rules say that you must have “All additional electronics must draw power from a 20A circuit breaker,” but if you look above, the limit switch is essentially the same as a rotary switch except the rotary switch has more possibilities for outputs. i see this as many limit switches in one module. therefore, there would be no need to hook it up to a fuse.