Skills

Utility_Functions_with_State:

Just as it is natural for one to think of athletes as having different skills, it should also be natural for us to think of our robots as having different skills. Thus, each robot should have different skill objects, each of which lets the robot perform a certain function.

This is precisely what we have implemented in the 2002 RoboCup system. Each robot has a set of skills stored in a SkillSet object. Each skill is different and performs a different function. skills make coding easier by providing all the information a programmer would ever need at his/her finger tips: a timer, current vision data, parameters, specialized parameters for each skill, and a handle on the robot's destination. Skills allow state to be kept since skills are objects with private data, not just functions as used in the past. In addition, skills provide various methods for initialization, running, loading and reloading parameters, and much more.

Making skill objects in our system brings a number of advantages:

What Tools/Information do Skills Provide?

Each skill has a common interface and some common member objects, such as a timer, that are extended from the basic Skill class. Note that the Skill class has many pure virtual functions that must be defined in skills that are derived from it, so only derived skills can be instantiated.

A skill is first initialized based on the current state of the field. It is then run for that frame. Afterwards, it can be evaluated and updated so that its performance can be improved.

Below is a listing and explanation of all methods and stored data provided by all skills:

Protected Variables:

Methods:

SkillSets and how Skills are Created and Used:

Each robot has it's own skill set, which contains a unique instance of every skill included in the system. This allows multiple robots to be running the same skill, but have separate state information being stored. The SkillSet object has functions to perform certain functions on all skills in the set. Specifically, it has functions to evaluate and update all skills, and one to reset all skills so they can be run the next frame. There is also a function to reload all skills' parameter values from their respective text files. This method is run when the skillset is first created, and can also be recalled by a GUI menu entry. The skillset methods in detail are: