Description of the 2024 Warthog Robotics SSL Project

Caio O. Godinho, Eduarda F. Neumann, Pedro A.P. Fran¸coso

Warthog Robotics University of São Paulo at São Carlos

https://www.wr.sc.usp.br


Abstract This paper presents the Warthog Robotics Magic project and its main improvements made to this RoboCup SSL project during last year. During the last research and development cycle, changes were made to the goal keeper's strategy, an automatic calibration to the Kalman filter was introduced and a log file for WRCoach was implemented.

1 Introduction

Warthog Robotics is a research and development robotics group from the University of São Paulo at São Carlos. The group counts with over 100 members from several knowledge areas, such as computer science and electrical, mechatronic and computer engineering, and develops robotics technologies in several areas, applying most of them at robotics competitions.

Due to budget limitations, the team was not able to participate in the last edition of the RoboCup, but is still competing in local competition, finishing second place in the 2022 and 2023 Latin America RoboCup Open.

WR Magic is Warthog Robotics's project for RoboCup's SSL category. Its mechanical structure and electronic boards are the same from the last years, with improvements being made to the software system. This paper outlines the WR Magic project, including the robots themselves and their supporting systems, as well as present the newest improvements.

Although last year's TDP [6] foresaw major changes in the software's strategy module, WRCoach, and an opponent path prediction system, those were not implemented yet. Instead, modifications in the code were made to facilitate the development process. In addition, some changes in the behaviour of the goalkeeper were made, which improved the team's competitiveness. An improvement in the WREye vision filtering application was also implemented, which made it more robust to the usage of different camera settings and configurations of the environment.

2 Improvements

(This section contains subsections 2.1-2.5)

2.1 Automatic calibration of the Kalman filter

The Kalman filter presents a robust approach to tracking of objects in an uncertain environment [4]. Thus, this method is currently used by Warthog Robotics to keep track of the robots and ball present in the SSL game. The Kalman filter utilizes random variables to represent uncertainties in measurements and dynamic models of a system. Such errors are named Measurement noise and Process noise, respectively [5]. Therefore, a method was implemented in order to determine more accurate values for the noise in the instrument of measurement used, i.e, Measurement noise. This makes the filter more robust to different cameras and configurations of lighting used, for example.

First, relevant data related to each entity in the game was stored in CSV (comma-separated values) text files. That is, for the ball and each robot in the field was created a file storing both the position and angle measured and returned by the filter, velocity and time of measurement. With this, it is possible to calculate the standard deviation of an objects position due to noise interfering in the instrument of measurement used, i.e, the camera. To do so, a ball must be positioned in the field and left standing for some seconds, until enough samples of the balls position have been gathered. Currently, around eight hundred samples are taken. This data is then utilized to determine the standard deviation, as explained previously. The result for the standard deviation is stored in a TOML file. This file format is utilized for its simple syntax, in a way that it is human readable and easily parsed [3].

Previously to this implementation, an arbitrary value was used for the Measurement noise. Thus, the new approach leads to a filter more robust to different configurations of the environment, e.g, different cameras, height of the camera and lighting.

Although the data for the angle of the robots are stored in the data files, as explained previously, this values are not filtered. That's because a filter for the angle of the robots is yet to be implemented for future improvement.

Both the old and new filters were tested in the same conditions in our testing field observing the ball in 3 situations: with the ball still, with a robot kicking the ball and with the ball being moved more slowly. In each of these, we collected the filtered and raw values of the ball's position in the x axis and the ball's velocity along the x axis. The old filter calibrated manually in these conditions used the Measurement noise as 2.83 · 10^−4 m, whereas the new filter automatically calibrated the Measure noise as 3.71 · 10^−4 m.

The results are shown in Fig. 1, Fig. 2 and Fig. 3. In the test with the ball standing still, there's a clear improvement on the filtered velocity, however the filtered position of both versions are comparable. In the other two tests, no significant differences can be observed between the two versions.

In conclusion, the advantages of the new version of the Kalman filter are the automatic calibration for different environments and more stable values for constant velocities without compromising filtering of dynamic values.

Fig. 1: Kalman test results with still ball
Fig. 1: Kalman test results with still ball
Fig. 2: Kalman test results with slow ball
Fig. 2: Kalman test results with slow ball
Fig. 3: Kalman test results with kicked ball
Fig. 3: Kalman test results with kicked ball

2.2 Goalkeeper's behaviour

Warthog Robotics's previous goalkeeper behaviour was to move to intercept the ball coming to the goal after it is kicked. A different approach was implemented in 2023, in which the orientation of the opponent attacker is considered to find the trajectory of the ball before the ball is kicked, so there is more time for the goalkeeper to move. Also, the trajectory in which the goalkeeper moves was changed to always be the shortest possible. This was made by getting a trajectory that is always perpendicular to the attacker orientation, if the ball has not been kicked yet, or to the ball trajectory, if it has already been kicked.

Fig. 4a and Fig. 4b show the results of 10 simulated kicks in grSim for each version of the goalkeeper, where the green and red circles represent the position from where the ball was kicked. The positions of origin of the successful shots on goal, that is, where the goalkeeper failed, are colored in red, and the positions of origin of defended shots on goal are colored in green. It shows that the previous goalkeeper's behavior wasn't effective in center positions, where there were many different possibilities of trajectories for the ball to be kicked. In these situations, because the goalkeeper is usually further from the ball's trajectory, the anticipation of the movement to the defend position proved to be a substantial improvement.

Fig. 4: Goalkeeper test results
Fig. 4: Goalkeeper test results

2.3 WRCoach's log messages

WRCoach is an application build using Qt's QApplication [1] class. As such, it's possible to use QtMessageHandler [2] to write debug, warnings, critical and fatal error messages to a log file, facilitating the development process. To achieve this, a function, with the signature specified in the documentation, that receives the QtMsgType, QMessageLogContext and QString of each message and writes one corresponding entry in the log file was defined. This entry has the format [] T

2.4 WRCoach's constants

WRCoach uses multiple constants, such as PID constants, the maximum distance to consider ball possession, maximum kick power, among many others. In order to facilitate tests comparing different values for these constants, they were all aggregated in a single TOML file. The file has multiple tables to organize the constants according to what area they are used in, making it easier to navigate for developers.

2.5 WR Interface

We've been having problems regarding our WRCoach's match strategy. It's for that reason that we've been developing supportive software to help us test our system. One of those softwares is the WR Interface, with its frontend being based on a study focused on UI/UX Design aiming to improve the experience of other team members while using our system [8]. This Web Application receives player information, including - but not excluding other data - position, velocity, orientation, assigned playbook, current behaviour and skill in execution. And, in turn, allows us to better understand our current game state and to better access which WRCoach's functionalities we need to improve so that our whole system continues to evolve towards excellence.

When the WR Interface starts, the user will be present to the UI shown in Figure 5. After the selection of the desired team color, data from WRCoach will be sent to an endpoint configured on WRInterface's backend server that will transmit player data to the frontend using a WebSocket. In the frontend, an analogous image to Figure 6 will be rendered. There is also a feature that sets up a simulation inside grSim, making it possible to test our software without completely relying on the hardware.

The next step in the development of WR Interface is to implement a log recorder and a log player - that follows the Robocup SSL format [7] - on its backend so that we are able to analyze this data as a future project. This is important because we currently have very few ways to diagnose our system's failures and shortcomings.

Fig. 5: Welcome screen for WR Interface
Fig. 5: Welcome screen for WR Interface
Fig. 6: WR Interface receiving real time data from a simulated match
Fig. 6: WR Interface receiving real time data from a simulated match

3 Conclusions and future work

Warthog Robotics's latest improvements consisted primarily in adjustments in the WRCoach and WREye softwares. In WRCoach, constants and log files were created to ease the development process and the behaviour of the goalkeeper was changed to consider the opponent's orientation. In WREye, a method for finding the imprecision due to camera noise and using it in the Kalman filter was implemented.

For future improvements in WREye, a filter for the robots orientation will be made. In WRCoach, a behavior for passing the ball will be studied. Improvements on the hardware are also expected. The current radio station (WRStation) used is to be replaced by a better one and modifications in the robots hardware are being studied. For example, an increase in the robot's height to minimize friction with the floor. Also, a way of attaching the lid of the robot with magnets, instead of screws, was designed and its implementation will be carried through.

References

  1. QApplication documentation, https://doc.qt.io/qt-5/qapplication.html. Last accessed 9 Jan 2024
  2. QtMessageHandler documentation, https://doc.qt.io/qt-5/qtglobal.html. Last accessed 9 Jan 2024
  3. TOML documentation, https://toml.io/en/. Last accessed 10 Jan 2024
  4. Jong-Min Jeong, Tae-Sung Yoon and Jin-Bae Park: "Kalman filter based multiple objects detection-tracking algorithm robust to occlusion". 2014 Proceedings of the SICE Annual Conference (SICE), Sapporo, pp. 941-946 (2014)
  5. Kalman Filter Tutorial, https://www.kalmanfilter.net/default.aspx. Last accessed 10 Jan 2024
  6. Pedro A. G. Pizarro, Lucas F. Granela, Leandro T. C. Andrade, Kenzo M. Sakiyama, Rafael G. Lang, Ivan N. da Silva, Roseli A. F. Romero: Description of the 2023 Warthog Robotics SSL Project. In: 2023 Robocup.
  7. SSL Game Logs, https://ssl.robocup.org/game-logs/. Last accessed 25 Mar 2024
  8. Daniela M. Tamiya, Beatriz Y. Teodoro: Development of the Interface and User Experience Design for the Visual Dashboard of the Warthog Robotics Extracurricular Group's Football Robots. In: 2023 USP