View Single Post
  #59   Spotlight this post!  
Unread 11-01-2008, 11:29
Jon Stratis's Avatar
Jon Stratis Jon Stratis is offline
Mentor, LRI, MN RPC
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Minnesota
Posts: 3,844
Jon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond repute
Re: How many RoboCoach Commands?

Quote:
Originally Posted by Nate Laverdure View Post
Wow, nobody agrees with me? I didn't expect that.

All of you are concerned with default behavior. Specifically, you all mention that when the Action (which is triggered by the Command) ends, then the robot should default to Default Behavior.

Let me first define some of my terms:
Action -- a series of clearly defined movements; can be as simple as "move faster" or as complicated as "go explore that rock, drill a hole in it, do some chemistry, and back up ten feet and stop." (credit: ebarker)
Command -- any information sent to the robot to trigger an action; according to FIRST rules, there can be no more than four distinct commands.
Default Behavior -- whatever the robot was doing before any commands were issued, and before any actions were embarked upon.

Now if you'll bear with me, imagine this: what if the default behavior was that the robot was standing still, and would remain standing still unless any other command was received?

Now my examples and previously expressed exasperation should make sense, and you should agree with me that what I describe is illegal according to the 2008 rules, but in case it doesn't make sense and/or you don't agree, I'll walk through the 15-second hybrid period, time slot by time slot. If you're just tuning in now, you'll need to refer to my previous post to understand what I'm talking about.

Time
00:00 -- Hybrid period begins. The robot begins its default behavior, which, as I previously mentioned, is standing still.
00:00 - 00:03 -- Command "1" is received. Action "A" is triggered.
00:03 - 00:06 -- No command is sent. Since no command is received in this time slot (00:03 - 00:06), Action "E" is triggered.
00:06 - 00:09 -- Command "4" is received. Action "D" is triggered.
00:09 - 00:12 -- Command "3" is received. Action "C" is triggered.
00:12 - 00:15 -- Command "2" is received. Action "B" is triggered.

Action E is triggered by the lack of a command in any of the 5 time slots, would NOT normally happen as a part of Default Behavior.

This is what I've been trying to say: it is possible to
1) transmit a command,
2) and trigger any action (including complex series of events),
without actually sending a signal to the robot. AND, if the sum total of the distinct commands (including any commands sent by a LACK of a signal) total more than four, then the robot is violating the rules.
If you draw out a state diagram, you'll see that default behavior isn't just "standing still". Once you interact with it at all (send it ANY commands) the behavior of the robot changes, potentially for the rest of the match. If you draw out a state diagram, it might look something like the attached image.

In this example, sending a signal to the robot initiates a series of commands, and the lack of a signal just means that the series initiated by the previous command.

for example, you might hit "1" which means "drive over there, pick up that rock, and drill a hole in it" as three separate and distinct states. If during the first state in the sequence you send it command "2" which says "turn left, drive straight for 3 seconds, then stop and wait for instructions", you would be interrupting the sequence started with command "1", which is perfectly legal.

So from your example, action E is part of the default behavior of A.

They key is to draw out the state diagram, and ensure that each command received by the robot only goes to one state - it's illegal for button 4 to mean something different based on the state it's in. You could have more than one state per button, so long as the state is the same in every instance and the only difference is that it goes back to whatever it was doing previously (instead of always moving on to the same next state). The signal means the same thing every time. the robot's actions are the same every time for that signal.
Attached Images
File Type: bmp state-example.bmp (40.6 KB, 39 views)