AutoRef system architecture: Difference between revisions

From Control Systems Technology Group
Jump to navigation Jump to search
Line 87: Line 87:


===Game state flow visualization===
===Game state flow visualization===
===How to does the functional specification help in implementing a system component?===
The main purpose of the functional specification is to provide a unified goal and structure to all generations to facilitate the implementation of the functions needed to enforce the laws of the lawbook. When it comes to implementation of the system, 5 possible approaches were identified: 
Implement 1 or more individual skills:
In this approach, the excel document (the database) would provide an understanding of how the chosen skill is connected to all tasks within the scope of the game laws in the lawbook. Having this view would allow the implementation team to formulate the requirements that would satisfy all the tasks needing this skill in the future, thus nullifying the need to ever reimplement the same skill again. For example, if “Ball identify (X,Y)” is the chosen skill, then if this skill was implemented just to satisfy the “Determine if the ball is in or out of pitch (BOOP)” task, then might be implemented to simply know if the ball is in or out of pitch, while in the overall system it might also be important to know in which area of the field is the ball and maybe even the exact coordinates of the ball, and not only whether it is in the field or not. This shows that implementing a skill to satisfy a single task might lead to the reimplementation of that skill one more time to satisfy another task. Which is not a very efficient way of implementation.
Implement a task:
In this approach, the excel document would give an idea about the individual skills needed to fulfill the chosen task (from the perspective of the functional specification) as well as clearly showing the laws needing this task. Ideally, if the implementation team decides to pursue implementing a whole task, then each new skill associated with that task should be implemented in a way that negates the need for reimplementation of that skill, as explained in the first approach. 
Tasks can be dependent on other tasks, and some tasks are only applicable during certain game states. That is where the need for the visualization (yEd diagram) arises. The visualization clarifies which tasks are needed in each game state and the dependencies between these tasks. Having this information would further help the implementation team know the scope and operating environment of their task, moreover it will clarify the connections between the chosen task and other tasks in the system helping in smoothening the integration between different tasks.
Implement a law:
If a law is to be implemented, then the excel document presents the tasks and skills needed to implement the chosen law. Ideally, if a law is to be implemented, then each new task or skill associated with that law should be implemented in a way that negates the need for reimplementation of that task or skill in the future, as explained in the first 2 approaches. 
Implementing a whole law involves a lot of integration steps. That is again where the visualization proves its usefulness, as it shows the which tasks needs to be integrated and in which order should they operate. This eases the understanding of the system interactions and streamlines the integration process.
Improve the implementation of a skill or a task to satisfy more requirements that were not considered before:
If the best-case scenario is not achieved while implementing a skill or a task, and there is a need for reimplementing a skill or a task, having the excel document and the yEd diagram, and using them as explained in the first and second approach, will help in achieving the best-case scenario where the reimplemented skill or task would never need to be reimplemented.
Integrate skills or tasks:
The integration approaches benefit the most from having an overall understanding of the connections between different system components, as this will help in streamlining the integration process.
In all cases, it will be extremely useful for the implementation team to have a global understanding of the whole system as well as knowing all the connections related to their specifically chosen subsystem of interest. Having this info will help in formulating more globally fitting requirements for their subsystem. 
Regardless of the approach chosen, the most efficient method of working is to aim to implement each component in such a way that it easily integrates well with other related components of the system without the need for reimplementation. Implementing components in such a manner will make the system modular, flexible, and highly adaptable to changes. The main purpose of the functional specification is to provide future implementation teams with a good base structure (puzzle grid) that eases the process of extracting the information needed to implement or integrate system components.

Revision as of 19:08, 31 March 2021

The system architecture for the AutoRef autonomous referee for RoboCup Middle Size League (MSL) robot soccer is a proposed conceptual model which describes the structure, behavior, and more views of the AutoRef system.

The system architecture is based on the specification of functions as derived from the MSL rulebook (v21.4). In short, this functional specification (as provided by AutoRef MSD 2020) is a breakdown of MSL rulebook laws into robot skills through robot tasks: tasks are statements describing what the AutoRef must do to enforce the rules, written in plain language as to fully explain referee actions without describing the means by which to achieve them; skills are fundamental abilities which are needed to accomplish a specific task. A systems thinking approach underscores the system architecture.

Recommendations for future work emphasize an updated functional decomposition to synchronize the textual breakdown of law-task-skill and the corresponding game state flow visualization.

System architectures proposed by teams prior to MSD 2020 are available within their respective AutoRef team contribution pages.

Background

A systems thinking analysis by MSD 2020 initiated the development of the system architecture with respect to the AutoRef goal as an autonomous referee system for RoboCup MSL. This process identified two primary stakeholder concerns:

  • Fairness, a concern for the RoboCup committee, soccer teams, and spectators.
  • Project continuity, a concern for AutoRef stakeholders and teams.

Systems thinking also identified that one the most important and challenging refereeing duties in ensuring fairness is to be able to enforce all the laws of the MSL rulebook.

An archiving of past work running parallel to systems thinking revealed continuity issues — namely, continuity issues based on the patterns observed in past generations’ work. Two main issues identified by this archiving were:

  • the lack of an overarching structure and goal for all generations; and
  • the lack of an easy and quick overview of what past generations have done and what is yet to be done.

The combined results of systems thinking and archiving led to the idea of creating a global structure which translates laws from the MSL rulebook into enforcement tasks to specify what a referee must do to enforce the laws. Further work revealed that a structure with a single layer was not appropriate for specifying the referee's functions; thus, a second layer of skills was added to the structure to add value to the purpose of that structure. The primary purpose of the skill layer is to describe the kind of information which needs to be collected at MSL matches to perform enforcement tasks.

A puzzle analogy to understand the system architecture approach

To better help in the understanding of the problem and proposed solution, the AutoRef project can be seen as a puzzle with numerous puzzle pieces. Team contributions prior to MSD 2020 introduced new puzzle pieces to the collection of pieces, but in a very unstructured manner, making it difficult for the subsequent teams to integrate their piece to previously developed pieces. The lack of a grid or puzzle layout also made it very difficult for new generations to have a global understanding of the whole system, and thus greater effort was spent trying to understand and analyze the big picture.

The system architecture approach established by MSD 2020 is to introduce the grid and identify all the needed puzzle pieces within the scope of the MSL rulebook. In reality, AutoRef is more complex than a puzzle, and having a grid with all pieces identified is not enough to streamline the development process for all teams, so a visualization showing the connections between different areas of the puzzle was also added. Functional specification is the term given to the development this grid.

Functional specification

Functional specification works like a blueprint that helps development teams to understand how an application will function. A functional specification essentially tells developers what features they need to build and why. For AutoRef, the functional specification defines the functionalities needed to enforce the laws in the RoboCup MSL rulebook.

How the functional specification for AutoRef is derived

Using the MSL rulebook's chapters and laws as the starting point, each chapter of the rulebook was analyzed, then the laws involved in each chapter were extracted, consequently each law is then translated into a set of task groups then tasks, and finally each task is translated into a set of skills. The skills represent the most basic functionality within this structure.

One of the most challenging problems was defining the number of layers involved in this transformation and drawing boundaries between what is considered a task group, a task or a skill. Another challenge was to keep the skills at the right abstraction level to avoid getting into technical specification, thus keeping the functional specification as flexible, when it comes to technical design, as possible.

Law-task-skill breakdown (database)

Guidelines to create the database document

Law chapters: The RoboCup MSL rulebook is already split into 17 chapters, with each chapter denoted with a number (1 to 17). Each chapter tackles a certain area of the game (Fouls, offsides, the duration of the match … etc.). The chapters are following the FIFA laws, stating the FIFA law and then stating and explaining the corresponding RoboCup Law. We focused on the RoboCup Laws.

Laws: Each chapter contains 1 or more laws, sometimes a law might include sub laws as well. For example, Law 10.1 has 2 sub Laws 10.1.1 and 10.1.2. The decision on what is considered a law was based on the structure used in the law book. For example, 10.1.1 is a law as it has no further sub laws, and 14.1 is also considered a law as it has no further sub laws.

Task groups: As sometimes the smallest subsection within the law book was still too broad, an additional layer between laws and task was introduced to bridge the gap between them. The general guideline for what is considered a task group is that it is a statement describing a huge task that can be further split into smaller tasks.

Tasks: A task is a level more specific than a task group. The general guideline for what is considered a task, is that a task is an explanation of what should be done to enforce a law, written in such a way that is understandable by a human. For example, a task would be to decide if a goal is scored or not.

Skills: A skill is one level lower than a task. The general guideline for a skill is that it is a command given to a robot without getting into any technical details. The main difference between commands given to a robot and instructions given to a human is that human instructions usually do not include any details about what kind of information needs to be extracted from the surrounding, while a robot needs this information. For example, know the position of the ball is a skill, but use a camera to know the position of the ball is too detailed for our definition of a skill as it gets into the territory of technical specification.


Task guideline examples
Task Not a task
Decide if a goal was scored Know the position of the ball
Decide if the ball was shot from the correct half of the field Know the position of the field lines
Decide if chapter 10 of the law book is being followed
Judge based on MSL RoboCup law book

Skill guideline examples
Skill Not a skill
Know the position of the goal line or goal plane Use 3 cameras to identify the coordinates of the ball in a cartesian coordinate system
Decide if the ball was shot from the correct half of the field Visually identify players
Decide if chapter 10 of the law book is being followed
Decide which team gets the goal kick

https://youtu.be/EsxHrF4rYnM

Game state flow visualization

How to does the functional specification help in implementing a system component?

The main purpose of the functional specification is to provide a unified goal and structure to all generations to facilitate the implementation of the functions needed to enforce the laws of the lawbook. When it comes to implementation of the system, 5 possible approaches were identified:

Implement 1 or more individual skills:

In this approach, the excel document (the database) would provide an understanding of how the chosen skill is connected to all tasks within the scope of the game laws in the lawbook. Having this view would allow the implementation team to formulate the requirements that would satisfy all the tasks needing this skill in the future, thus nullifying the need to ever reimplement the same skill again. For example, if “Ball identify (X,Y)” is the chosen skill, then if this skill was implemented just to satisfy the “Determine if the ball is in or out of pitch (BOOP)” task, then might be implemented to simply know if the ball is in or out of pitch, while in the overall system it might also be important to know in which area of the field is the ball and maybe even the exact coordinates of the ball, and not only whether it is in the field or not. This shows that implementing a skill to satisfy a single task might lead to the reimplementation of that skill one more time to satisfy another task. Which is not a very efficient way of implementation.


Implement a task:

In this approach, the excel document would give an idea about the individual skills needed to fulfill the chosen task (from the perspective of the functional specification) as well as clearly showing the laws needing this task. Ideally, if the implementation team decides to pursue implementing a whole task, then each new skill associated with that task should be implemented in a way that negates the need for reimplementation of that skill, as explained in the first approach.

Tasks can be dependent on other tasks, and some tasks are only applicable during certain game states. That is where the need for the visualization (yEd diagram) arises. The visualization clarifies which tasks are needed in each game state and the dependencies between these tasks. Having this information would further help the implementation team know the scope and operating environment of their task, moreover it will clarify the connections between the chosen task and other tasks in the system helping in smoothening the integration between different tasks.


Implement a law:

If a law is to be implemented, then the excel document presents the tasks and skills needed to implement the chosen law. Ideally, if a law is to be implemented, then each new task or skill associated with that law should be implemented in a way that negates the need for reimplementation of that task or skill in the future, as explained in the first 2 approaches.

Implementing a whole law involves a lot of integration steps. That is again where the visualization proves its usefulness, as it shows the which tasks needs to be integrated and in which order should they operate. This eases the understanding of the system interactions and streamlines the integration process.


Improve the implementation of a skill or a task to satisfy more requirements that were not considered before:

If the best-case scenario is not achieved while implementing a skill or a task, and there is a need for reimplementing a skill or a task, having the excel document and the yEd diagram, and using them as explained in the first and second approach, will help in achieving the best-case scenario where the reimplemented skill or task would never need to be reimplemented.


Integrate skills or tasks:

The integration approaches benefit the most from having an overall understanding of the connections between different system components, as this will help in streamlining the integration process.


In all cases, it will be extremely useful for the implementation team to have a global understanding of the whole system as well as knowing all the connections related to their specifically chosen subsystem of interest. Having this info will help in formulating more globally fitting requirements for their subsystem.

Regardless of the approach chosen, the most efficient method of working is to aim to implement each component in such a way that it easily integrates well with other related components of the system without the need for reimplementation. Implementing components in such a manner will make the system modular, flexible, and highly adaptable to changes. The main purpose of the functional specification is to provide future implementation teams with a good base structure (puzzle grid) that eases the process of extracting the information needed to implement or integrate system components.