Git Product home page Git Product logo

gamecontroller's Introduction

RoboCup SPL GameController Support Tools

These are the GameController support tools developed by team B-Human for the RoboCup SPL. Originally, this repository contained the GameController as well. It was used in the RoboCup SPL from 2013 to 2022. Since 2023, a new version is being used.

Please note that the Humanoid League currently uses a fork.

The sources mentioned in some sections of this document are available at https://github.com/RoboCup-SPL/GameController.

Acknowledgement

The development was partially supported by the RoboCup Federation within the calls for Support for Projects for League Developments for 2013, 2015, 2017, and 2018.

1. Building from Source

To build it from the source code you may use Apache Ant. Just call "ant" in the main directory.

Building the source code requires the JDK 1.8 or newer.

2. GameStateVisualizer

As of the 2017 RoboCup competitions, the GameStateVisualizer has been replaced by the GameStateVisualizer mode of the TeamCommunicationMonitor.

To start it, run

java -jar TeamCommunicationMonitor.jar --gsv -l <league>.

The parameter -l (or --league) is optional; if it is not given, the GSV assumes a game in the SPL.

3. TeamCommunicationMonitor

The TeamCommunicationMonitor (TCM) is a tool for visualizing the data communicated by robots during SPL games.

It serves two main purposes:

  1. offering diagnostic data such as which robots are communicating on which team ports.
  2. visualizing the data that was sent via SPLStandardMessages in both textual and graphical form.

For more info see TCM.

gamecontroller's People

Contributors

ahasselbring avatar anbau avatar ben47955 avatar dennisschuerholz avatar drewnoakes avatar dseifert avatar felixwege avatar fthielke avatar h3ndrk avatar ijnek avatar jayenashar avatar koensw avatar mariogrobler avatar martingerken avatar nicoleschrader avatar rkost avatar skuzzle avatar thewh1terose avatar thomasroefer avatar yuzong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gamecontroller's Issues

Warnung bei mehreren GameControllern

Während des RoboCup in Kanada waren bei mehreren Spielen mehr als ein GameController an einem Feld aktiv. Normalerweise kann man das im TeamCommunicationMonitor beobachten. In Kanada waren dafür allerdings keine Monitore vorhanden.

Unser Aufnahmesystem (http://robocup.tools) hört auf GameController Nachrichten und startet/stopt die Aufnahme entsprechend. Durch die widersprüchlichen Nachrichten sind die Aufnahmen bei uns in stark gestückelt. So konnten wir das Problem beobachten.

Wir schlagen vor eine Anzeige in den GameController einzubauen welche anzeigt ob GameController Nachrichten noch von anderer Quelle kommen.

~Benjamin Schlotter
Berlin United

Strange NullPointerException

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at controller.EventHandler.update(Unknown Source)
    at controller.EventHandler.access$000(Unknown Source)
    at controller.EventHandler$1.run(Unknown Source)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:673)
    at java.awt.EventQueue.access$300(EventQueue.java:96)
    at java.awt.EventQueue$2.run(EventQueue.java:634)
    at java.awt.EventQueue$2.run(EventQueue.java:632)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:643)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at controller.EventHandler.update(Unknown Source)
    at controller.EventHandler.access$000(Unknown Source)
    at controller.EventHandler$1.run(Unknown Source)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:673)
    at java.awt.EventQueue.access$300(EventQueue.java:96)
    at java.awt.EventQueue$2.run(EventQueue.java:634)
    at java.awt.EventQueue$2.run(EventQueue.java:632)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:643)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)

using java-7-openjdk-amd64/ and Ubuntu 11.10 / 12.04. Moreover, I can't quite reproduce it all the time, so it may be related to some timing issues between the threads?

Penalty Time Counter in Ready State

The penalty time counter does not increase during the ready state.
This was correct for 2017, but not for the 2018 rules (see 3.2 at "Ready").

fallen is invalid using RoboCupGameControlReturnData constructor

RoboCupGameControlReturnData's constructor in include/RoboCupGameControlData.h sets fallen to 255.

The value 255 is explained in SPLStandardMessage, where it was taken from, but not described in RoboCupGameControlData.h. From SPLStandardMessage.h,

fallen(255), // placeholder to detect in the TCM if this field is not set

Using this constructor, the Robot doesn't show up in the GameController because fallenValid = fallenState == 0 || fallenState == 1 evaluates as false in GameControlReturnData.java Line120.

Is this by design or a bug? It took me a while to figure out that the udp connection wasn't the issue. My suggestion would be to have fallenValid = fallenState == 0 || fallenState == 1 || fallenState == 255 instead.

7v7 Mode causes NullPointerException

When selecting the 7v7 mode, a NullPointerException occurs. The other modes seem to work fine.

Steps to reproduce:

  • Clone repo
  • ant
  • cd bin
  • java -jar GameController.jar
  • Select "SPL 7v7"

Commit hash

67d2c06 (current master at time of writing)

Traceback

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at controller.ui.StartInput.updateTeamColorIndicator(Unknown Source)
	at controller.ui.StartInput.reloadTeamColor(Unknown Source)
	at controller.ui.StartInput.access$100(Unknown Source)
	at controller.ui.StartInput$3.actionPerformed(Unknown Source)
	at java.desktop/javax.swing.JComboBox.fireActionEvent(JComboBox.java:1264)
	at java.desktop/javax.swing.JComboBox.contentsChanged(JComboBox.java:1337)
	at java.desktop/javax.swing.AbstractListModel.fireContentsChanged(AbstractListModel.java:123)
	at java.desktop/javax.swing.DefaultComboBoxModel.setSelectedItem(DefaultComboBoxModel.java:94)
	at java.desktop/javax.swing.DefaultComboBoxModel.addElement(DefaultComboBoxModel.java:132)
	at java.desktop/javax.swing.JComboBox.addItem(JComboBox.java:716)
	at controller.ui.StartInput.showAvailableTeams(Unknown Source)
	at controller.ui.StartInput.access$1200(Unknown Source)
	at controller.ui.StartInput$5.actionPerformed(Unknown Source)
	at java.desktop/javax.swing.JComboBox.fireActionEvent(JComboBox.java:1264)
	at java.desktop/javax.swing.JComboBox.setSelectedItem(JComboBox.java:589)
	at java.desktop/javax.swing.JComboBox.setSelectedIndex(JComboBox.java:624)
	at java.desktop/javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicComboPopup.java:907)
	at java.desktop/java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:298)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6635)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
	at java.desktop/javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(BasicComboPopup.java:551)
	at java.desktop/java.awt.Component.processEvent(Component.java:6400)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5011)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Java version

$ java --version
openjdk 11.0.18 2023-01-17
OpenJDK Runtime Environment (build 11.0.18+10)
OpenJDK 64-Bit Server VM (build 11.0.18+10, mixed mode)

Mismatch GUI and broadcasted kick-off team in second half

In the second half of the game, the kick-off team is shown differently in the GUI than broadcasted via network.

Assume team 4 (blue) starts against team 5 (red). In the first half, team 4 (blue) is shown to have kickoff and the data sent is:

data.team[0].teamnumber: 4
data.team[1].teamnumber: 5
data.kickoffteam: 0

Now go through READY/SET/PLAY and switch to Finish. Then click on "Second Half". The teams will switch sides, and team 5 (red) is now on the left side and shown as having kick-off. However, the data sent is

data.team[0].teamnumber: 5
data.team[1].teamnumber: 4
data.kickoffteam: 1

(The same happens if you let the first half time expire)

Penalty kick procedure and substates

In section 3.7.1 Penalty kick procedure the text does not specify that the free kick substate is active during the ready and set states. Instead the text makes it seem that the free kick substate is only active during the playing state: "The game switches to the free kick sub-state of the Playing game state, and the game clock is resumed."

Can we alter the text to make it clear that the substate is active during the READY and SET states also?

Java 11 TeamCommunicationMonitor?

Hello there. On Ubuntu Linux 18.04, I have java -jar GameController.jar working on master, but not the TeamCommunicationMonitor, it just exits.

Any ideas?

pzrq@rbox:~/Projects/GameController$ cd bin
pzrq@rbox:~/Projects/GameController/bin$ java -jar TeamCommunicationMonitor.jar WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.jogamp.common.os.NativeLibrary$3 (file:/home/pzrq/Projects/GameController/bin/deps/gluegen-rt.jar) to method java.lang.ClassLoader.findLibrary(java.lang.String)
WARNING: Please consider reporting this to the maintainers of com.jogamp.common.os.NativeLibrary$3
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Inconsistency detected by ld.so: dl-lookup.c: 111: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!
pzrq@rbox:~/Projects/GameController/bin$ java --version
openjdk 11.0.8 2020-07-14
OpenJDK Runtime Environment (build 11.0.8+10-post-Ubuntu-0ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.8+10-post-Ubuntu-0ubuntu118.04.1, mixed mode, sharing)

Also on macOS 11.0.1 (20B29) with Big Sur and Java 8 I'm seeing a blank window rather than the default empty field.
Screen Shot 2020-11-21 at 2 06 29 pm

Screen Shot 2020-11-21 at 2 13 25 pm

rUNSWift has been using the official 2019 one via the SPL Downloads page though looking at upgrading towards 2020+, e.g. to see the proposed penalty and goalbox areas.

Thanks in advance for any suggestions,
Peter Schmidt on behalf of rUNSWift

Official clarification

The description says that it is the official GameController, but I think that now the official one is the one from "RoboCup-Humanoid-TC", right?

Player number in return packet

The file include/RoboCupGameControlData.h mentions for RoboCupGameControlReturnData that the player number starts with 0.

Based on the code in GameControlReturnData and RobotWatcher.update() the player numbers that the robots should transmit should be the same as displayed on-screen (i.e. 1 for player 1, whereas 0 would be the invisible player and this packet would be ignored). So it seems that this comment and the code are in conflict.

Error:robots can't connect to the GameController

I follow the Readme.md , build completed.Next I input "java -jar GameController.jar",the main screen is opened.But our team's robots can't connect to the GameController,because each robot window on the main interface displays gray.However, our team uses GameController2017 without this error.

Background Image not working for HL

When starting the application the HL Leagues cannot start a game due to the new background color definitions being global in the GameController

Timeouts during penalties

The GUI allows to take timeouts during the penalty shoots. If the shot-taking team takes a timeout, it loses the shot after the timeout ends. Not sure if timeouts are possible in the SPL during penalty shoots.

Example:

  • in knock-out game, score 1:1 and go to penalty
  • blue is penalty taker, before SET go to TIMEOUT for blue (display bug: GUI changes to show the number of pushes in SPL, not the shots taken)
  • at the end of timeout, red is penalty taker and blue is shown as having taken no shot yet (expected behavior: blue takes the shot)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.