Building Behaviors for an Autonomous Routine
VEX Robotics Competitions require planning an autonomous routine for the 60-second Programming Skills Match of the Robot Skills Challenge, and for the 15-second Autonomous Period of the current year's game. Programming the robot to run autonomously requires breaking down what the robot needs to do into programmable behavior-based code.
Here are some typical behaviors for a VEX competition Robot:
Driving forward and reverse
Turning right and left
Grabbing a game object
Precisely placing a game object
Sorting between different game objects
Once you have built the basic instructions for these types of behaviors, running a successful autonomous routine simply means planning the order of these actions!
Motivate Discussion - Automated Behaviors
Display an image of VEX Robotics Competition field either the for the current year's game or you can use this one from the 2019-2020 VEX Robotics Competition Tower Takeover.
Start by providing students with an objective to plan for but ensure that it is appropriate for their experience level. The robot's manipulator and sensors may not have been discussed yet and so, keep the objective obtainable with only basic movements. For example, ask them to plan how to move from the top red corner in the field above to the bottom right purple cube without touching anything else on the field.
Q: If you needed to move from the top left corner to the bottom right corner, what is your first step in planning that?
A: Answers could vary but should relate to breaking down the task into smaller programmable behaviors, or behaviors that correspond to VEXcode V5 instructions.
Q: What is the robot's first behavior?
A: Answers could be either to turn in a direction or to drive forward. Acceptable answers should all correspond to single instructions.
Q: What would you need to do to program turns or driving? What measurements would you need?
A: For an autonomous program without sensors, the precise turning and driving distances would be necessary.
Extend Your Learning - Sketch and Psuedocode
To expand this activity, ask your students to sketch a challenge field (real or created) to scale and then write pseudocode (Google / .docx / .pdf ) for a 15-second autonomous program. Pseudocode has not been introduced in this lab but, by planning with simple behaviors, the students have already started practicing writing pseudocode. The practice of writing pseudocode, as described within the link, does not have to be introduced but students' plan should include a decomposition of the problem into steps basic enough to be considered pseudocode.