srobo / competition-simulator

A simulator for Student Robotics Virtual Competitions
https://studentrobotics.org/docs/simulator/
MIT License
9 stars 2 forks source link

Live scoring #18

Closed antoinepetty closed 3 years ago

antoinepetty commented 4 years ago

Implement a way to score each round automatically (and display this on screen?)

This will involve at least:

I suggest that we probably want a separate Supervisor to handle the scoring, if Webots supports having more than one. Note that this scoring Supervisor may need to communicate with the arena Supervisor (see #216), so it may make sense for them to be the same process.

trickeydan commented 4 years ago

We could potentially even tie this into the SRComp HTTP API.

PeterJCLaw commented 3 years ago

Tying the match running to SRComp's HTTP API would likely be somewhat complicated on a couple of fronts:

Instead I think we're more likely to head down the route of having the supervisor "robot" doing a bunch of the match coordination side of things and then outputting a structured log (with timestamps) of what happened so we can feed that through the system.

There is of course plenty of room to feed those output logs into SRComp to expose the information to API consumers (would need work in SRComp, however as an extension to the existing match score files I can see this fitting reasonably well).

PeterJCLaw commented 3 years ago

Note for picking this up -- I suspect that this might be easier after we've fixed #83 since that also involves interpreting the positions of items in the world.

PeterJCLaw commented 3 years ago

Removing this from the milestone because we could run our planned game without live scoring. I think we would need arena interaction, however I've broken that out into #216.

PeterJCLaw commented 3 years ago

I've updated the description with more details, partly from thinking about how this would work for the ideas we have of the SR2021 game.

WillB97 commented 3 years ago

The sr2021 game has a secondary supervisor running the territory_controller. Currently each time a zone is claimed a line is printed to stdout with the station code, claimant and simulation time. It just needs to be converted into a form that srcomp can accept.