Coder Social home page Coder Social logo

cheesy-arena's Introduction

Cheesy Arena Build Status

A field management system that just works.

For the game-agnostic version, see Cheesy Arena Lite.

Key features

For participants and spectators

  • Same network isolation and security as the official FIRST FMS
  • No-lag realtime scoring
  • Team stack lights and seven-segment display are replaced by an LCD screen, which shows team info before the match and realtime scoring and timer during the match
  • Smooth-scrolling rankings display
  • Direct publishing of schedule, results, and rankings to The Blue Alliance

For scorekeepers and event staff

  • Runs on Windows, macOS, and Linux
  • No install prerequisites
  • No "pre-start" โ€“ hardware is configured automatically and in the background
  • Flexible and quick match schedule generation
  • Streamlined realtime score entry
  • Reports, results, and logs can be viewed from any computer
  • An arbitrary number of auxiliary displays can be set up using any computer with just a web browser, to show rankings, queueing, field status, etc.

License

Teams may use Cheesy Arena freely for practice, scrimmages, and off-season events. See LICENSE for more details.

Installing

From a pre-built release

Download the latest release. Pre-built packages are available for Linux, macOS (x64 and M1), and Windows.

On recent versions of macOS, you may be prevented from running an app from an unidentified developer; see these instructions on how to bypass the warning.

From source

  1. Download Go (version 1.22 or later required)
  2. Clone this GitHub repository to a location of your choice
  3. Navigate to the repository's directory in the terminal
  4. Compile the code with go build
  5. Run the cheesy-arena or cheesy-arena.exe binary
  6. Navigate to http://localhost:8080 in your browser (Google Chrome recommended)

IP address configuration

When running Cheesy Arena on a playing field with robots, set the IP address of the computer running Cheesy Arena to 10.0.100.5. By a convention baked into the FRC Driver Station software, driver stations will broadcast their presence on the network to this hardcoded address so that the FMS does not need to discover them by some other method.

When running Cheesy Arena without robots for testing or development, any IP address can be used.

Under the hood

Cheesy Arena is written using Go, a language developed by Google and first released in 2009. Go excels in the areas of concurrency, networking, performance, and portability, which makes it ideal for a field management system.

Cheesy Arena is implemented as a web server, with all human interaction done via browser. The graphical interfaces are implemented in HTML, JavaScript, and CSS. There are many advantages to this approach โ€“ development of new graphical elements is rapid, and no software needs to be installed other than on the server. Client web pages send commands and receive updates using WebSockets.

Bolt is used as the datastore, and making backups or transferring data from one installation to another is as simple as copying the database file.

Schedule generation is fast because pre-generated schedules are included with the code. Each schedule contains a certain number of matches per team for placeholder teams 1 through N, so generating the actual match schedule becomes a simple exercise in permuting the mapping of real teams to placeholder teams. The pre-generated schedules are checked into this repository and can be vetted in advance of any events for deviations from the randomness (and other) requirements.

Cheesy Arena includes support for, but doesn't require, networking hardware similar to that used in official FRC events. Teams are issued their own SSIDs and WPA keys, and when connected to Cheesy Arena are isolated to a VLAN which prevents any communication other than between the driver station, robot, and event server. The network hardware is reconfigured via SSH and Telnet commands for the new set of teams when each mach is loaded.

PLC integration

Cheesy Arena has the ability to integrate with an Allen-Bradley PLC setup similar to the one that FIRST uses, to read field sensors and control lights and motors. The PLC hardware travels with the FIRST California fields; contact your FTA for more information.

The PLC code can be found here.

LED hardware

Due to the prohibitive cost of the LEDs and LED controllers used on official fields, for years in which LEDs are mandatory for a proper game experience (such as 2018), Cheesy Arena integrates with Advatek controllers and LEDs.

Advanced networking

See the Advanced Networking wiki page for instructions on what equipment to obtain and how to configure it in order to support advanced network security.

Contributing

Cheesy Arena is far from finished! You can help by:

  • Checking out the TODO list, writing a missing feature, and sending a pull request
  • Filing any bugs or feature requests using the issue tracker
  • Contributing documentation to the wiki
  • Sending baked goods to Pat

Acknowledgements

Several folks have contributed pull requests. Thanks!

In addition, the following individuals have contributed to make Cheesy Arena a reality:

  • Tom Bottiglieri
  • James Cerar
  • Kiet Chau
  • Travis Covington
  • Nick Eyre
  • Patrick Fairbank
  • Eugene Fang
  • Thad House
  • Ed Jordan
  • Karthik Kanagasabapathy
  • Ken Mitchell
  • Andrew Nabors
  • Jared Russell
  • Ken Schenke
  • Austin Schuh
  • Colin Wilson

cheesy-arena's People

Contributors

agdespopoulos avatar andrewda avatar baconstrip avatar bsilver8192 avatar dependabot[bot] avatar eforbes avatar ejordan376 avatar ewpratten avatar fangeugene avatar fletchers7 avatar jolewine avatar kenschenke avatar kython89 avatar legoktm avatar neyre avatar ograff avatar patfair avatar phil-lopreiato avatar sbaumgarten avatar thadhouse avatar thatnerdjack avatar themacman 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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

cheesy-arena's Issues

Better Favicon?

The favicon for the web interface is the Chezy Champs logo. But it should probably be something different because cheesy-arena can be used for things other than Chezy Champs.

Maybe change the logo to something that looks similar but uses the letters: CA?

Cheesy Arena FTA notepad.

This year FIRST acquired a handy dandy app called FTA Notepad. This app is both a field monitor and allows adding notes to teams. the note then shows up when that team is on the field. The notes are also shared to everyone else connected to the API running on FMS.

Would it be possible to develop a version of this app for Cheesy Arena?

Match numbers not being sent over FMS protocol

The match numbers were not being sent over the FMS protocol. While trying to debug the e-stop issues, this made the logs a little hard to fine. The match replay number can be ignored, so the match number should be fairly easy to add to the protocol.

FTA Display

Can you bring back the FTA display from the 2017.1.2 version, also keep the existing field monitor.

Match logs 404

Run->Match Logs returns a 404 and points to a non existent file.

Linksys Access Point Issues

Opening an issue here to document problems in relation to the new Linksys field access point used in Cheesy Arena this season. All these seem to be intermittent issues.

Issue 1: Team SSIDs will not update on the AP. This is most commonly seen with the AP retaining the team numbers from the previous match. The temporary fix for this is either reloading the match (sometimes works), stopping and restarting the instance of Cheesy Arena on the arena computer (nearly always works), or in severe cases, restarting the access point.

Issue 2: Access point experiences intermittent crashes. At Chezy Champs the AP would crash and restart (somewhat randomly), usually during the configuration of the networking hardware and once during a match. I attempted to diagnose during one of the breaks, but it seemed that OpenWRT doesn't retain logs after restart (although I could definitely be missing something).

There were additional issues at Beach Blitz this weekend with the AP, and although I helped remotely diagnose some of them I can't speak to exact details at the event. Maybe @ThadHouse could as I know he was there.

Player station lighting and displays info

We are looking into using Cheesy Arena for a practice field that we plan on holding scrimmages on and thus we would love to outfit our player stations with the arena displays. I saw in the Readme that there were plans to release schematics, software, and a BOM in a future release. Is there any plans to release those anytime soon?

Question about driverstations

Due to the fact that my team does not have access to the hardware required for testing, I figured i should ask here.

When a driverstation is connected to a FMS, is it still able to connect to and control a robot over it's own wireless interface? Or does the robot have to also be connected to FMS?

Access point buffer overflow

b35a70d added the feature for cheesy arena to retry setting the access point config till it worked.

unfortunately this seems to cause the access point to stall and be unable to accept new configs.
Rebooting cheesy arena seemed to fix this issue.
maybe instead add the option to reload the match. (right now this is done by loading a test match then loading the match back up, but b35a70d causes problems requiring rebooting of cheesy arena)

Allow customizing WiFi channels without needing to edit the AP config template

Right now the wifi channel is hardcoded to 157 in templates/access_point.cfg. It would be nice if it was easier to customize this (changeable via web UI) and could be set on a per team basis so we can spread the networks across different channels.

At CalGames we were unlucky and the venue already had a few networks on 157 :/

generated schedule does not show all matches

start time: 12:00 pm
end time: 4:00 pm
cycle time 10 mins
Match count: 21 Actual end time: 4:00 pm

With 26 teams in the database, the result is
Total match count: 21
matches per team: 4
Excess matches: 3
Matches needed for +1 per team: 1

The generated schedule only shows 18 matches even though it shows that there should be 21 matches.
If you save the generated schedule, the match schedule report also only shows 18 matches.

This is with the current master version, commit a919cb0, from 5 November 2016.

Suggestion/Request: Cheesy Arena mobile app

When I was FTAing at Capital City Classic, I had the idea for a Cheesy Arena mobile app. There are a few cool features I'd like to see in such an app. They include:

  • Push notifications: Have notifications (user configurable) for things like robots disconnecting, team (or even a whole alliances) driver stations connecting, match start and end, etc. This is kind of the main feature of the mobile app
  • More mobile-friendly editing: While Cheesy Arena has a really good mobile interface already, sometime editing things like the match play screen on my iPhone didn't always work reliably
  • Adjustable layouts? Maybe be able to customize each display, or take different displays from each screen and add them to a user design-able dashboard?
  • iOS specific: Apple Watch field monitor?

This is just the beginning of different features I'd like to see. I'd love to see what others think about this idea!

Also, I'm not great with app development, and I know that all of the 254 guys are quite busy, so if someone else had time and was looking for a new project this would be a pretty neat thing to make.

TBA push doesn't happen automatically

We updated to the latest version of Chessy Arena today at the Capital City Classic, and found that the TBA push was not working. If we hit Show Results from the main control page, and edited the URL to point to a valid match, it would push. (I couldn't find any other code paths than that to trigger a push when reading the code)

Match Logs

First of all, this is a great project, thanks for doing this and releasing it. I was looking into viewing logs from matches, but when I run it on my computer, they are empty. The log files are generated, but they don't have any data, but this makes sense since I bypassed all the robots (since I don't actually have any). Do you have any sample logs (maybe from Chezy Champs) I can look at?

Timer and Score display

Add display option of the timer and for red/blue score to the display configuration page to allowing setting up displays solely to show the time or one of the score displays.

Layer 2 Switch + Router instead of 3550

I have a 3524 from my old CCNA days, but no 3550.

I do however, have 3 2821 routers. Does cheesy arena require the line speed routing from the L3 switch? Or can I just modify the config and have it route over to the 2821?

Issue with blue lights/E-stops

I'm not 100% on the main stack, but it is not currently working in my setup. I plan on debugging that later.

Estops:
In the Wiki, it says the Blue CommandBlock should be @ 10.0.100.42, and the red @ 10.0.100.41. When configured in this way, the blue lights flash fine, but the E-stops trigger the RED e-stops on the PLC/LED testing page. To make the RED E-stops work for the RED Alliance stations, I had to reverse the IP addresses, so RED was on 42 and Blue was on 41. Is this a bug on your guys' end too? Or have I mis-wired something? The Blue Alliance E-stops on the match play and test are also locked into the E-Stop, and as such I can't run a test match. (But the E-Stops are released and the orange alliance e-stop lights are not on)

Lights:
When configured in the reverse-IP-config mentioned earlier, only one of the blue alliance lights flashes. (The bottom of the three on the control-block) The other two are solid. However, the e-stop light works for all three, but it does not transfer to the software. All three red stack lights seem to work fine. (E-stop lights included).

I am using the most recent commit. I will try Last Year's know good release and update this issue with what I find.

Thanks in advance for any/all support!

Awards mode

Hey, can you make an awards mode for the leds, like the awards mode for the standard fms. The lights would just show red and blue on each element on the field, kind of what is happening during a match. Thanks

Can't generate match schedule (2015 release)

Added 25 teams to the teams list then tried to generate a match schedule (as shown in the screenshot):
issuecheesyarena

After clicking the "Generate Schedule" button it throws up the "Incomplete or invalid schedule block parameters specified." error message. I followed along with the demo video so I don't believe I missed any steps - correct me if I'm wrong.

***FEATURE SUGGESTION*** Simulated PLC using Raspberry Pi or Arduino Board

The possibility to use a raspberry pi's GPIO header or an Arduino Board as a simulated PLC would be very nice. This would allow teams to use in-expensive electronics to have better a better FMS during offseason events. (Mainly, Having actual E-Stop buttons, Automatic Scoring, and outputs for devices such as boilers or sandstorms.)

Push match surrogate & dq to TBA

the-blue-alliance/the-blue-alliance#2024 builds support for this.
The format is like:

{
  "red": {
    "teams": ["frc177", "frc195", "frc125"],
    "surrogates": ["frc177", "frc195"],
    "dqs": [],
    "score": 25
  },
  "blue": {
    "teams": ["frc433", "frc254", "frc222"],
    "surrogates": ["frc433"],
    "dqs": ["frc433"],
    "score": 12
  }
}

dqs and surrogates are both optional. Team keys must be in teams or else TBA will return a 400 error. Of course, surrogates will be available when the schedule is generated, while dqs will only be available once a match is played.

Validate match invariants when editing the score breakdown manually

When editing the score at the end of a match, or in match review, you can enter 1 auto crossing for position 1 and then 2 teleop crossings for position 1. This is an invalid case, and can result in a breach not being scored (I assume there is an ==2 test somewhere). In addition this gives a team more points than they should receive. Validate the <= 2 crossing per position invariant on submit, along with other invariants including but not limited to (total auto crossings + reaches) <= 3 and (scales + challenges) <= 3

FTA display doesn't show team # unless their driver station has connected

The FTA display didn't show the team # until they plugged in and connected their driver station - only the match play interface did. This was problematic when a team hadn't shown up yet and the FTA was trying to figure out what team needed to be called, or when teams were in the wrong driver station, and needed to swap.

Failed to configure team WiFi: Invalid WPA key

I am trying to run cheesy arena for the first time, after I have set up a Cisco Cat switch and a Cisco AP model 1131 (AIR-AP1131AG-A-K9)

The only real difference between the model you would like, and this one, is that my unit has fastethernet port rather than a Gig port. I have the config in the AP as I believe I should. (I think).

Anyway, after starting CheesyArea, and launching the admin page , adding a team for match play results in this on the mac ... running terminal.

/cheesy-arena.command
goose: no migrations to run. current version: 20140823193501
2017/02/16 09:49:08 Listening for driver stations on UDP port 1160
2017/02/16 09:49:08 Listening for driver stations on TCP port 1750
2017/02/16 09:49:08 Serving HTTP requests on port 8080
2017/02/16 09:49:30 Failed to configure team WiFi: Invalid WPA key '' configured for team XXX

where XXX is the team number.

I did add the team to the list of teams, and I can log into both the switch and AP via the mac terminal command using the passwords, so I believe telnet communication is working.

I looked at the source code, and I don't see any reference to Gigethenet so I don't believe your scripts care about the AP having only fastethernet ports. I believe it is looking for the red/blue vlans and to the best of my knowledge my AP is set up the way you need it to be.

AP config is attached...

ca-ap.txt

Any ideas?

Optionally delay TBA posting for a few seconds

One thing I noticed at Chezy Champs and again at CalGames last year was that TBA posting was iinstantaneous, which is great, but sometimes even before the official score was announced at the venue. It definitely kills the suspense when your phone tells you the result while everyone else is eagerly waiting for the announcer to reveal it.

I would suggest putting in a delay of 10-20 seconds to account for this. I think it's more important during elimination matches though. It should probably be configurable since different announcer + scoring tea!s will take different amounts of time to reveal scores after they are finalized.

networking issues

Apologies if not the correct place.

I picked up the recommended equipment from the advanced networking section and am having difficulty configuring them. I have the configs pulled, but ran into 2 issues:

  1. On the switch, Vlan1 is by default administratively down. I put no shutdown into the config to bring it backup.

  2. Both radios on the Cisco AP were down, also put the shutdown in there.

However, I'm still having an issue where I cannot connect to the AP when it is plugged into port 9 or 11 on the switch, which are still trunks. Neither the event server, in port 1, can ping/telnet into the AP, nor can the switch itself.

I have attempted a fix by changing the BVI1 ip address to something in the 10.0.100.x/24 block, to no change. However, if I remove the ap from the switch and plug it directly into the event server, which is at 10.0.100.5, it can telnet/ping and works as expected.

Any suggestions? I'm loving cheesy arena so far, and would love to use it for our upcoming week0 event.

Edit:

I am dumb. I had forgotten to provide the server with a gateway, leading to issues. I'd close this if I could, and would do it with much shame.

Logo staying up on audiance view.

Hello,
I was just fooling around with cheesy arena, seeing how smooth it works and whatnot (using the precompiled windows release)

It seems the arial assist logo is stuck on the display of the audience view.

Update referee panel without refresh

The referee panel should be updated using websockets to display penalties and cards applied by other referees without needing to be refreshed.

To make this work even smoother, you would ideally also use websockets to submit fouls/cards instead of submitting a form and refreshing the page.

No Robot Voltage on Control Page, Driver Station Not seeing Robot

Not seeing voltage from robot on Match control page and while the DS sees FMS, it does not ever connect to the robot. The only error I'm getting in the console is that it can't connect to the 10.0.100.2 switch. Why does it need to connect to the switch? Is that what is limiting us from seeing the robot voltage?

Teams unable to tether to their robot in between elimination matches

At CalGames 2016, we saw that teams were unable to tether to their robots between elimination matches when they just played and were going to play in the next match because they were still being controlled by the FMS. Removing them from the current match by clearing the field with "Load test match" didn't work - I had to restart cheesy-arena each time for teams to be able to tether.

Issues with 2017 driver station

May not be an issue with Cheesy Arena.
I'm writing this up in case someone else runs into same problem.

I'm testing connecting to the 2017 driver station on windows 10.
The driver station got an ip-address assigned from the DHCP server and found the robot.
When the FMS gets contact from the DS, the ip-address on the DS drops and switches to a link-local address 169...*. Reseting the ethernet gets a new ip-address, DS attempts to reconnect to the FMS and the process repeats.

I set the DS ip-address to 10.TE.AM.X and the DS is able to connect to FMS without an issue.

Allow force publishing of the schedule

Currently schedules are only posted on save after generation, and upon showing a Qual or elims match result. This is challenging if you generate the schedule before entering TBA keys. Allow a manual push of the schedule.

Are ports 5801 -5810 permitted in cheesy arena?

The official field permits communication between the ds and the robot wired clan on tcp ports 5801 thru 5810 as well as port 80. Is this currently implemented in the project? I think if I need to add this it would be modify access list 111 through 116 on the. Switch?

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.