profile
viewpoint
Peter Law PeterJCLaw @thread United Kingdom

davidhalter/jedi 4478

Awesome autocompletion, static analysis and refactoring library for python

PeterJCLaw/build-contents 1

Javascript functions to automatically build the a contents box for an HTML page from its headings

PeterJCLaw/clink-completions 1

Completion files to clink util

PeterJCLaw/code-submitter 1

Code submitter for Student Robotics Virtual Competition.

PeterJCLaw/cyanide-tester 1

A simple PHP test framework, initially targetted for use with the Student Robotics IDE: cyanide

PeterJCLaw/db 1

PHP Database class

penelopezone/badger-vagrant 0

#yolo #swag #srobo #boxes

created tagsrobo/competition-simulator

tag0.3.1

A simulator to be used for the Student Robotics Virtual Competition 2020

created time in an hour

delete branch srobo/competition-simulator

delete branch : release-using-python-3.6

delete time in an hour

PR merged srobo/competition-simulator

Reviewers
Change to release on Python 3.6

It turns out that in Python 3.5 (and lower) pathlib.Path.resolve() will check for the existence of a file as part of its resolution. This changed in Python 3.6 (with an argument to get the old behaviour back). We want the new default behaviour.

+2 -1

0 comment

1 changed file

PeterJCLaw

pr closed time in an hour

push eventsrobo/competition-simulator

Peter Law

commit sha 4fe8918f243f181fda90ac9e32ca6f1492f2e9b6

Change to release on Python 3.6 It turns out that in Python 3.5 (and lower) pathlib.Path.resolve() will check for the existence of a file as part of its resolution. This changed in Python 3.6 (with an argument to get the old behaviour back). We want the new default behaviour.

view details

push time in an hour

PR opened srobo/competition-simulator

Change to release on Python 3.6

It turns out that in Python 3.5 (and lower) pathlib.Path.resolve() will check for the existence of a file as part of its resolution. This changed in Python 3.6 (with an argument to get the old behaviour back). We want the new default behaviour.

+2 -1

0 comment

1 changed file

pr created time in an hour

push eventsrobo/competition-simulator

Peter Law

commit sha 4fe8918f243f181fda90ac9e32ca6f1492f2e9b6

Change to release on Python 3.6 It turns out that in Python 3.5 (and lower) pathlib.Path.resolve() will check for the existence of a file as part of its resolution. This changed in Python 3.6 (with an argument to get the old behaviour back). We want the new default behaviour.

view details

push time in an hour

create barnchsrobo/competition-simulator

branch : release-using-python-3.6

created branch time in an hour

issue commentsrobo/tasks

Define how teams will submit their code

More stuff from the discussion:

  • we should (obviously) authenticate uploads
  • could we have them give us a commit id from the IDE?
  • do we want a file or an archive; probably an archive so they can submit multiple files
  • how bad if they see each others' code? (could they upload to the forums as an attachment? technically it's possible to not let them download from the forums, but does that break other things)
  • we should define what happens for teams who haven't made a submission, both initially and between sessions. This also potentially has impacts on the cut-off time discussion
  • are there existing tools we can use for this? e.g: coursework? (but are they all terrible?)
RealOrangeOne

comment created time in 2 hours

issue commentsrobo/tasks

Define how teams will submit their code

are we going to allow submissions slightly after it I think being strict on this is just going to annoy people. I think reviewing submissions after (maybe even as late as 10:15) is likely just fine.

Indeed, though this then has the interaction with teams who may be developing in the same place as the submission (if we use the IDE or another git repo form) -- a race condition between the actual deadline and them making changes after the published one.

I agree that being very strict on the timing likely isn't a good thing.

I'd suggest we dump their code at submission time to a sharable location (drive), and run simulations through that

Yes, I definitely expect that we'd pull the relevant archives in a way which respected the fact that we'd logically frozen them.

RealOrangeOne

comment created time in 2 hours

created tagsrobo/competition-simulator

tag0.3.0

A simulator to be used for the Student Robotics Virtual Competition 2020

created time in 2 hours

delete branch srobo/competition-simulator

delete branch : how-to-release

delete time in 2 hours

push eventsrobo/competition-simulator

Peter Law

commit sha 011350c8ae9e28b008de16af3b4225230dbf077d

Add release instructions

view details

push time in 2 hours

PR opened srobo/competition-simulator

Reviewers
Add release instructions
+8 -0

0 comment

1 changed file

pr created time in 2 hours

create barnchsrobo/competition-simulator

branch : how-to-release

created branch time in 2 hours

delete branch srobo/competition-simulator

delete branch : threadless

delete time in 2 hours

PR merged srobo/competition-simulator

Reviewers
Introduce a separate robot class with manual timestep control

This allows teams to avoid a variety of timing issues which introduce randomness into the robot behaviours that we don't want. Notably this appears to fix the issues reported by MAI in the forums.

At least the camera needs to have a time step explicitly forced before it can provide useful information, so we handle that in the Camera itself. This feels reasonable in any cases as we know that a real camera takes a non-zero amount of time to respond. Simple testing suggests that other sensors may not be so affected, though it is hard to know whether that is a natural consequence of them only being used after several timesteps have been done as a matter of course.


This is backwards compatible, however when using the new ManualTimestepRobot class time.sleep alone is no longer suitable for waiting for things to happen -- teams must use Robot.sleep instead. We will need to document both that this new alternative exists and how to use it.

+50 -24

0 comment

3 changed files

PeterJCLaw

pr closed time in 2 hours

push eventsrobo/competition-simulator

Peter Law

commit sha 30750f5ead2ca728268e634042ad3d21a73d85db

Extract the timestep thread to a legacy class This avoids a variety of timing issues which introduce randomness into the robot behaviours that we don't want. At least the camera needs to have a time step explicitly forced before it can provide useful information, so we handle that in the Camera itself. Simple testing suggests that other sensors may not be so affected, though it is hard to know whether that is a natural consequence of them only being used after several timesteps have been done as a matter of course.

view details

Peter Law

commit sha 75b028fec1556e75947f06a961c201e67cb96274

Preserve the legacy behaviour as the default It turns out that it's fairly easy to write code which doesn't explicitly advance time and instead ends up in an infinite loop waiting for time to advance on its own. Given that of the two competitor code samples we have one managed to hit this case in several places, we should aim to keep compatibility where we can while providing a way out for teams that want the alternative.

view details

Peter Law

commit sha 1050942ba54174e91a6bf2317b8a12722f68f61c

Make this docstring marginally better

view details

Peter Law

commit sha b8dc1b8301fd2c6abf4554204f30efe1a5d2edf2

Merge branch 'threadless'

view details

push time in 2 hours

delete branch srobo/competition-simulator

delete branch : require-minimum-timestep

delete time in 2 hours

PR merged srobo/competition-simulator

Reviewers
Ensure that all sleep times do actually advance the clock

Teams don't know what the smallest timestep is, so this ensures that all attempts to sleep do sleep for at least some time. This also avoids issues where the simulation doesn't run because no steps are being taken.

This only really applies when not running the background thread, however as that's the plan anyway (see #158) this seems useful.

+9 -2

0 comment

1 changed file

PeterJCLaw

pr closed time in 2 hours

push eventsrobo/competition-simulator

Peter Law

commit sha 1aa9f1c23573bf6ad75958e8ee3768e1a2e15727

Ensure that all sleep times do actually advance the clock Teams don't know what the smallest timestep is, so this ensures that all attempts to sleep do sleep for at least some time. This also avoids issues where the simulation doesn't run because no steps are being taken.

view details

Peter Law

commit sha 00eb22fe6d4bf5838e5680ecf82650a4d31d9b66

Round up sleeps instead of down This sidesteps the issue of small values becoming zero.

view details

Peter Law

commit sha 48e430b31f98a0fffa938d8e15e42a2e2714fd98

Merge branch 'require-minimum-timestep'

view details

push time in 2 hours

issue commentsrobo/tasks

Define how teams will submit their code

From the discussion today:

  • do we actually want a hard deadline, or are we going to allow submissions slightly after it? (i.e: actually freeze at 10:05 rather than 10:00)
  • how does that interact with teams using the same place for development and submission? Specifically what happens if they continue to develop after the given time assuming that their submission has already been frozen? Note: it's not easy to copy content between projects in the IDE, so this seems possible.
RealOrangeOne

comment created time in 2 hours

Pull request review commentsrobo/team-emails

Announce virtual comp schedule

+---+to: sr2020-teams+subject: SR2020 Virtual Competition Schedule+---++Hi all++We're pleased to announce the structure of the SR2020 virtual competition. We will be running 5 sessions over 3 weekends.++You will have until 10am on each day to make your changes before your team's code is frozen. Then **at 3pm we will be live-streaming matches** back-to-back on YouTube.

There's a couple of considerations around this which we'd not previously discussed that lead to us being less confident about an IDE solution. I think it could still be a valid fallback, but IMO leaving this vague for now gets us more time to find an alternative (I'm hoping to get my submitter thing working this weekend).

I'll put the discussion details on https://github.com/srobo/tasks/issues/593.

antoinepetty

comment created time in 2 hours

issue closedsrobo/tasks

Put stream on website

The live stream needs to be linked or embedded from the website.

Original

comp/website/livestream

Dependencies

  • #480 Arrange a live stream from the competition

closed time in 2 hours

PeterJCLaw

issue commentsrobo/tasks

Put stream on website

Done in https://github.com/srobo/competition-website/commit/257b35ffd8c0d57b8e1225082d4fdcb912307f92. We'll update the other streams on the days.

There is a separate task to swap the site into competition mode (https://github.com/srobo/tasks/issues/486).

PeterJCLaw

comment created time in 2 hours

issue commentsrobo/tasks

Schedule the league matches

Conclusion from the discussion today:

  • @prophile is going to schedule these, possibly manually
  • we'll have 12 matches (i.e: three full rounds) per session, for a total of 48 matches overall (12 appearances per team)

For now I've put a terrible placeholder into the compstate.

PeterJCLaw

comment created time in 2 hours

push eventsrobo/competition-website

Peter Law

commit sha 257b35ffd8c0d57b8e1225082d4fdcb912307f92

Insert the first of the actual livestream urls

view details

push time in 2 hours

push eventsrobo/sr2020-comp

Peter Law

commit sha cd987d2a68a8fb3369afdf0187c7fd264ed183b1

Add a placeholder schedule This is totally _not_ the schedule we should use for the competition, however it will do for now to deploy something other than our test matches.

view details

push time in 2 hours

delete branch srobo/competition-simulator

delete branch : recording-per-folder

delete time in 2 hours

PR merged srobo/competition-simulator

Reviewers
Put recordings in a folder each enhancement

This makes it easier to share each of them (a recording is made of several files).

Fixes #159.

+6 -8

0 comment

1 changed file

PeterJCLaw

pr closed time in 2 hours

issue closedsrobo/competition-simulator

Change recordings to have a folder per recording

Each recording is several files so to make it easier to share them we should group them into a directory per match.

The naming probably wants to stay similar, just add another layer of directory.

closed time in 2 hours

PeterJCLaw

push eventsrobo/competition-simulator

Peter Law

commit sha 68adaded294401ebc59654902d3f2218a05bbcf6

Always construct our own time This is just complexity we're not using.

view details

Peter Law

commit sha 8c0a73b77562c386f0441d4eac40c5e529a52b70

Put recordings in a folder each This makes it easier to share each of them (a recording is made of several files). Fixes https://github.com/srobo/competition-simulator/issues/159.

view details

Peter Law

commit sha 83c9836bbd895c1ee4402f886f562e747e422c9a

Don't need to str() here

view details

Peter Law

commit sha 11650cc08e249a867c1ddf91b7597be27fff75b9

Merge branch 'recording-per-folder'

view details

push time in 2 hours

issue closedsrobo/competition-simulator

Change recordings to have a folder per recording

Each recording is several files so to make it easier to share them we should group them into a directory per match.

The naming probably wants to stay similar, just add another layer of directory.

closed time in 2 hours

PeterJCLaw

push eventsrobo/sr2020-comp

Peter Law

commit sha 603c3a1eefdc13b1e5680b13bade57e629fde772

Add placeholder extra spacing I don't think we need this, but it might be useful to have these match numbers written down.

view details

push time in 3 hours

Pull request review commentsrobo/website

Virtual competition events

----

I'm not completely sure. I think we do have redirects somewhere in the website.

antoinepetty

comment created time in 3 hours

Pull request review commentsrobo/website

Virtual competition events

+---+title: Virtual Competition League 1

I was wondering that, but it gets rather a mouthful. For the compstate I've currently got "First Saturday league" etc., though I'm open to changing that if we can find a good name. I'd definitely like to have the events and the compstate be similar if we can.

antoinepetty

comment created time in 3 hours

push eventsrobo/sr2020-comp

Peter Law

commit sha b7cf74108b0fae7bca5c3d0d942ae8e0587f8c93

Update match timings to the agreed schedule

view details

push time in 3 hours

Pull request review commentsrobo/website

Virtual competition events

+---+title: Virtual Competition League 1

I realise this name is getting quite long, but maybe clarify that this is session one rather than a subset of the league? I read this just now like it was a group stage or something.

antoinepetty

comment created time in 3 hours

Pull request review commentsrobo/competition-simulator

Ensure that all sleep times do actually advance the clock

 def sleep(self, secs: float) -> None:         if secs < 0:             raise ValueError('sleep length must be non-negative') -        # Ensure the time delay is a valid step increment-        n_steps = int((secs * 1000) // self._timestep)+        # Ensure the time delay is a valid step increment, while also ensuring

I was actually planning to leave that to error in the underlying method. Do you think it needs handling other than that?

PeterJCLaw

comment created time in 3 hours

push eventsrobo/competition-simulator

Peter Law

commit sha 83c9836bbd895c1ee4402f886f562e747e422c9a

Don't need to str() here

view details

push time in 4 hours

Pull request review commentsrobo/competition-simulator

Put recordings in a folder each

 GAME_DURATION_SECONDS = 150  -def recording_path(when: Optional[datetime.datetime] = None) -> Path:-    if not when:-        when = datetime.datetime.now()+def recording_path() -> Path:+    now = datetime.datetime.now() -    date = when.date().isoformat()-    name = '{}.html'.format(when.isoformat())+    date = now.date().isoformat()     # Windows doesn't like colons in filenames-    name = name.replace(':', '-')-    return Path(date) / name+    name = str(now.isoformat()).replace(':', '-')+    return Path(date) / name / '{}.html'.format(name)

While the target for the competition is 3.7, we're still supporting 3.5 for development.

PeterJCLaw

comment created time in 4 hours

issue commentsrobo/competition-simulator

Enable brake toggling

I was having a look in the Webot docs and I think that we could approach this using the force/torque motor controls rather than the velocity controls.

antoinepetty

comment created time in 4 hours

PR opened srobo/competition-simulator

Reviewers
Put recordings in a folder each enhancement

This makes it easier to share each of them (a recording is made of several files).

Fixes #159.

+6 -8

0 comment

1 changed file

pr created time in 4 hours

create barnchsrobo/competition-simulator

branch : recording-per-folder

created branch time in 4 hours

Pull request review commentsrobo/website

Virtual competition events

----

Is there a way we can make this page redirect to somewhere suitable? I think we have a bunch of things which link to this page. It would be a shame to break those links.

antoinepetty

comment created time in 4 hours

Pull request review commentsrobo/website

Virtual competition events

+---+title: Virtual Competition Knockouts and Finals+date: 2020-07-25 15:00:00+layout: event+type: competition+location: Online+---++The Student Robotics Competition marks the ultimate stage of SR2020, showcasing the months of preparation. Our teams will work hard to push their virtual robots to the limit, competing against each other, and evolving their strategies to gain the upper hand.++Code submission will be due at 10am. Our live-steam will run from 3pm to 4:30pm

Do we need to indicate the length at this point? I think we have a few more things to finalise before we know that for sure (especially for the knockouts).

antoinepetty

comment created time in 4 hours

Pull request review commentsrobo/website

Virtual competition events

+---+title: Virtual Competition Knockouts and Finals+date: 2020-07-25 15:00:00+layout: event+type: competition+location: Online+---++The Student Robotics Competition marks the ultimate stage of SR2020, showcasing the months of preparation. Our teams will work hard to push their virtual robots to the limit, competing against each other, and evolving their strategies to gain the upper hand.++Code submission will be due at 10am. Our live-steam will run from 3pm to 4:30pm

Full stop at the end of this sentence? (also elsewhere)

antoinepetty

comment created time in 4 hours

Pull request review commentsrobo/competition-simulator

Introduce a separate robot class with manual timestep control

 from controller import Robot as WebotsRobot  # isort:skip  -class Robot:-    """Class for initialising and accessing robot hardware"""+class ManualTimestepRobot:+    """+    Class for initialising and accessing robot hardware.

1050942

PeterJCLaw

comment created time in 4 hours

push eventsrobo/competition-simulator

Peter Law

commit sha 1050942ba54174e91a6bf2317b8a12722f68f61c

Make this docstring marginally better

view details

push time in 4 hours

Pull request review commentsrobo/competition-simulator

Introduce a separate robot class with manual timestep control

 from controller import Robot as WebotsRobot  # isort:skip  -class Robot:-    """Class for initialising and accessing robot hardware"""+class ManualTimestepRobot:+    """+    Class for initialising and accessing robot hardware.

So I was wondering what the sr-robot did any better and it turns out that this is from there.

PeterJCLaw

comment created time in 4 hours

Pull request review commentsrobo/competition-simulator

Introduce a separate robot class with manual timestep control

 def sleep(self, secs: float) -> None:         # cleanup if Webots tells us the simulation is terminating. When webots         # kills the process all the proper tidyup will happen anyway.         self.webots_step_and_should_continue(duration_ms)+++class AutomaticTimestepRobot(ManualTimestepRobot):+    """+    Robot class which preserves the original automatic time-advancing behaviour.++    This class launches a background thread which advances the timestep in a+    tight loop. This is somewhat more convenient to program against because it+    does not rely on the `sleep` method being called in order for time to+    advance. However as a result the timestep is considerably less predictable+    which can result in unexpected robot behaviours.++    The `sleep` method of this class is still available and is thread-safe.+    """++    def init(self) -> None:+        self.webots_init()+        super().init()++    def webots_init(self) -> None:+        # Create a thread which will advance time in the background, so that the+        # competitors' code can ignore the fact that it is actually running in a+        # simulation.+        t = Thread(+            target=self.webot_run_robot,+            # Ensure our background thread alone won't keep the controller+            # process runnnig.+            daemon=True,+        )+        t.start()

I would agree, however this is moved code which I was aiming to leave unchanged.

PeterJCLaw

comment created time in 4 hours

Pull request review commentsrobo/competition-simulator

Introduce a separate robot class with manual timestep control

     'MarkerType',     'MARKER_ARENA',     'MARKER_TOKEN_GOLD',+    'ManualTimestepRobot',

They appear to be length sorted.

PeterJCLaw

comment created time in 4 hours

issue commentsrobo/tasks

Update website with competition timings

We should also email the teams about the updates.

PeterJCLaw

comment created time in 4 hours

Pull request review commentsrobo/competition-simulator

Ensure that all sleep times do actually advance the clock

 def sleep(self, secs: float) -> None:             raise ValueError('sleep length must be non-negative')          # Ensure the time delay is a valid step increment-        n_steps = int((secs * 1000) // self._timestep)+        n_steps = int((secs * 1000) // self._timestep) or 1

00eb22fe6d4bf5838e5680ecf82650a4d31d9b66 resolves this by rounding up rather than down (which is still within the API contract of time.sleep).

PeterJCLaw

comment created time in 4 hours

Pull request review commentsrobo/competition-simulator

Ensure that all sleep times do actually advance the clock

 def webots_step_and_should_continue(self, duration_ms: int) -> bool:         Webots telling us whether or not the simulation is about to end).         """ +        if duration_ms <= 0:+            raise ValueError(+                "Duration must be greater than zero, not {!r}".format(duration_ms),+            )+

I'd rather not -- that has impacts on the simulation (that it can get stuck) which this PR is intending to resolve.

PeterJCLaw

comment created time in 4 hours

push eventsrobo/competition-simulator

Peter Law

commit sha 00eb22fe6d4bf5838e5680ecf82650a4d31d9b66

Round up sleeps instead of down This sidesteps the issue of small values becoming zero.

view details

push time in 4 hours

delete branch srobo/competition-simulator

delete branch : tee-stdout-log-file

delete time in 4 hours

PR merged srobo/competition-simulator

Reviewers
Tee stdout to a log file next to the robot code

This is useful when debugging issues with the simulator as well as hopefully generally useful for the teams.

+60 -12

0 comment

1 changed file

PeterJCLaw

pr closed time in 4 hours

push eventsrobo/competition-simulator

Peter Law

commit sha f35efe35750f555506b37bb8c176270f65b8bdc8

Tee stdout to a log file next to the robot code This is useful when debugging issues with the simulator as well as hopefully generally useful for the teams.

view details

Peter Law

commit sha 5d62b19981676926ce354c787a0d53e047884012

Clarify stdout teeing using contextlib

view details

Peter Law

commit sha 3f376f183143f868d2ebde9582ec33e57aa9eec3

Explain the construction of this filename

view details

Peter Law

commit sha 5a64c9e5d50e38559734e953d8c4725a76138734

Merge branch 'tee-stdout-log-file'

view details

push time in 4 hours

Pull request review commentsrobo/competition-simulator

Tee stdout to a log file next to the robot code

 def reconfigure_environment(robot_file: Path) -> None:     os.chdir(str(robot_file.parent))  +def log_filename(zone_id: int) -> str:+    now = datetime.datetime.now()

3f376f1

PeterJCLaw

comment created time in 4 hours

Pull request review commentsrobo/competition-simulator

Tee stdout to a log file next to the robot code

 def reconfigure_environment(robot_file: Path) -> None:     os.chdir(str(robot_file.parent))  +def log_filename(zone_id: int) -> str:+    now = datetime.datetime.now()+    return 'log-zone-{}-{}.txt'.format(+        zone_id,+        now.isoformat().replace(':', ''),+    )+++class TeeStdout:+    def __init__(self, name: Path) -> None:+        self.name = name++    def __enter__(self) -> None:+        self.file = open(str(self.name), mode='w').__enter__()+        self.stdout = sys.stdout+        sys.stdout = self  # type: ignore

5d62b19

PeterJCLaw

comment created time in 4 hours

Pull request review commentsrobo/competition-simulator

Tee stdout to a log file next to the robot code

 def reconfigure_environment(robot_file: Path) -> None:     os.chdir(str(robot_file.parent))  +def log_filename(zone_id: int) -> str:+    now = datetime.datetime.now()

log_filename

PeterJCLaw

comment created time in 5 hours

push eventsrobo/competition-simulator

Peter Law

commit sha 3f376f183143f868d2ebde9582ec33e57aa9eec3

Explain the construction of this filename

view details

push time in 5 hours

Pull request review commentsrobo/competition-simulator

Tee stdout to a log file next to the robot code

 def reconfigure_environment(robot_file: Path) -> None:     os.chdir(str(robot_file.parent))  +def log_filename(zone_id: int) -> str:+    now = datetime.datetime.now()+    return 'log-zone-{}-{}.txt'.format(+        zone_id,+        now.isoformat().replace(':', ''),+    )+++class TeeStdout:+    def __init__(self, name: Path) -> None:+        self.name = name++    def __enter__(self) -> None:+        self.file = open(str(self.name), mode='w').__enter__()+        self.stdout = sys.stdout+        sys.stdout = self  # type: ignore++    def __exit__(+        self,+        exctype: Optional[Type[BaseException]],+        excinst: Optional[BaseException],+        exctb: Optional[TracebackType],+    ) -> None:+        self.flush()+        self.file.__exit__(exctype, excinst, exctb)+        sys.stdout = self.stdout++    def write(self, data):+        self.file.write(data)+        self.stdout.write(data)+        self.flush()++    def flush(self):+        self.stdout.flush()+        self.file.flush()++ def main():     robot_mode = get_robot_mode()     robot_zone = get_robot_zone()     robot_file = get_robot_file(robot_zone, robot_mode).resolve() -    if robot_zone == 0:-        # Only print once, but rely on Zone 0 always being run to ensure this is-        # always printed somewhere.-        print_simulation_version()+    with TeeStdout(robot_file.parent / log_filename(robot_zone)):+        if robot_zone == 0:+            # Only print once, but rely on Zone 0 always being run to ensure this is+            # always printed somewhere.+            print_simulation_version() -    print("Using {} for Zone {}".format(robot_file, robot_zone))+        print("Using {} for Zone {}".format(robot_file, robot_zone)) -    # Pass through the various data our library needs-    os.environ['SR_ROBOT_ZONE'] = str(robot_zone)-    os.environ['SR_ROBOT_MODE'] = robot_mode-    os.environ['SR_ROBOT_FILE'] = str(robot_file)+        # Pass through the various data our library needs+        os.environ['SR_ROBOT_ZONE'] = str(robot_zone)+        os.environ['SR_ROBOT_MODE'] = robot_mode+        os.environ['SR_ROBOT_FILE'] = str(robot_file) -    # Swith to running the competitor code-    reconfigure_environment(robot_file)+        # Swith to running the competitor code

:( I'll fix that separately though.

PeterJCLaw

comment created time in 5 hours

delete branch PeterJCLaw/livestream-overlay

delete branch : fix-match-number

delete time in 5 hours

delete branch PeterJCLaw/livestream-overlay

delete branch : whitespace-fixes

delete time in 5 hours

PR merged srobo/livestream-overlay

Fix match number

Fixes https://github.com/srobo/tasks/issues/605 Fixes https://github.com/sourcebots/livestream-overlay/issues/4

+9 -11

0 comment

2 changed files

PeterJCLaw

pr closed time in 5 hours

issue closedsourcebots/livestream-overlay

Ensure match numbers are correct

I vaguely recall during SR2019 that we noticed an issue where the match numbers displayed by the overlay were off-by-one. I suspect this is because they were started at 1 and possibly indices into the list of matches. I'm not sure if it got fixed at the time, hence opening this ticket.

If that's the case and it's not already doing so, the overlay should change to using the display_name property of the matches to display a human name of the match. Doing so also ensures that the knockout matches get suitable names too.

closed time in 5 hours

PeterJCLaw

issue closedsrobo/tasks

Fix livestream overlay match numbers

That is: do https://github.com/sourcebots/livestream-overlay/issues/4.

This caused us to score the wrong match during the dry run.

closed time in 5 hours

PeterJCLaw

push eventsrobo/livestream-overlay

Peter Law

commit sha 0fcd066eaa32a62cb0d6e37c88211e37a7eaf10f

More room in the top content for a bit more text

view details

Peter Law

commit sha ff26d16aba86305398bda19ababaec26c04c3834

Make the display of match names more uniform This drops the "/N" part of the league match display in favour of matching the way that the league match identifiers are displayed everywhere else.

view details

Peter Law

commit sha ee35f65c1caf81e792e77403a298ddc2de975dd1

Clarify that placeholder data is placeholder Co-authored-by: Jake Howard <RealOrangeOne@users.noreply.github.com>

view details

Peter Law

commit sha 6a2344311d17f6cd8d17285b098dd24f47c13f9d

Merge branch 'fix-match-number'

view details

push time in 5 hours

push eventsrobo/livestream-overlay

Peter Law

commit sha 2ff37305e6acaee0042af78bca447e8d603d3188

Whitespace

view details

Peter Law

commit sha 20d3a3864bf072947d7b8a012675171e3192c995

Fix indent

view details

Peter Law

commit sha 3ddced598c4f92f7337da98bca668ebf99407f8f

Attempt to configure editors similarly

view details

Peter Law

commit sha 0af34c157dab960324fd44034e6e83095c4a5501

Convert to spaces

view details

Peter Law

commit sha 84b1388e498e2df9d27ca356ffc2ef80b4cb9be3

Merge branch 'whitespace-fixes'

view details

push time in 5 hours

push eventsrobo/competition-simulator

Peter Law

commit sha 5d62b19981676926ce354c787a0d53e047884012

Clarify stdout teeing using contextlib

view details

push time in 5 hours

push eventPeterJCLaw/livestream-overlay

Peter Law

commit sha ee35f65c1caf81e792e77403a298ddc2de975dd1

Clarify that placeholder data is placeholder Co-authored-by: Jake Howard <RealOrangeOne@users.noreply.github.com>

view details

push time in 5 hours

issue commentsrobo/competition-simulator

Add NumPy for teams to use

see #163

antoinepetty

comment created time in 5 hours

issue openedsrobo/competition-simulator

Add support for numpy etc.

We promised this to at least one competitor via the forums.

I forget the exact list of libraries, but we should either check that they're not actually needed or make them work.

created time in 5 hours

Pull request review commentsrobo/livestream-overlay

Whitespace fixes

+[*]+indent_style = space++insert_final_newline = true+trim_trailing_whitespace = true++[*.html]+indent_size = 4++[*.js]+indent_size = 2++[*.scss]+indent_style = tab

It's currently already tabs. I wanted to leave that alone rather than rewrite the whole file.

PeterJCLaw

comment created time in 5 hours

push eventsrobo/competition-simulator

Peter Law

commit sha f35efe35750f555506b37bb8c176270f65b8bdc8

Tee stdout to a log file next to the robot code This is useful when debugging issues with the simulator as well as hopefully generally useful for the teams.

view details

push time in 5 hours

PR opened srobo/competition-simulator

Reviewers
Tee stdout to a log file next to the robot code

This is useful when debugging issues with the simulator as well as hopefully generally useful for the teams.

+53 -12

0 comment

1 changed file

pr created time in 5 hours

create barnchsrobo/competition-simulator

branch : tee-stdout-log-file

created branch time in 5 hours

Pull request review commentsrobo/competition-simulator

Ensure that all sleep times do actually advance the clock

 def sleep(self, secs: float) -> None:             raise ValueError('sleep length must be non-negative')          # Ensure the time delay is a valid step increment-        n_steps = int((secs * 1000) // self._timestep)+        n_steps = int((secs * 1000) // self._timestep) or 1

The alternative here would be to not do this and have a nicer error at this layer. I've not put a lot of thought into whether that's better here. (Certainly it has the disadvantage that teams may find that code which currently works stops working)

PeterJCLaw

comment created time in 5 hours

PR opened srobo/competition-simulator

Ensure that all sleep times do actually advance the clock

Teams don't know what the smallest timestep is, so this ensures that all attempts to sleep do sleep for at least some time. This also avoids issues where the simulation doesn't run because no steps are being taken.

This only really applies when not running the background thread, however as that's the plan anyway (see #158) this seems useful.

+6 -1

0 comment

1 changed file

pr created time in 5 hours

create barnchsrobo/competition-simulator

branch : require-minimum-timestep

created branch time in 5 hours

PR opened srobo/livestream-overlay

Fix match number

Fixes https://github.com/srobo/tasks/issues/605 Fixes https://github.com/sourcebots/livestream-overlay/issues/4

+9 -11

0 comment

2 changed files

pr created time in 6 hours

push eventPeterJCLaw/livestream-overlay

Peter Law

commit sha ff26d16aba86305398bda19ababaec26c04c3834

Make the display of match names more uniform This drops the "/N" part of the league match display in favour of matching the way that the league match identifiers are displayed everywhere else.

view details

push time in 6 hours

create barnchPeterJCLaw/livestream-overlay

branch : fix-match-number

created branch time in 6 hours

push eventPeterJCLaw/livestream-overlay

Peter Law

commit sha 2ff37305e6acaee0042af78bca447e8d603d3188

Whitespace

view details

Peter Law

commit sha 20d3a3864bf072947d7b8a012675171e3192c995

Fix indent

view details

Peter Law

commit sha 3ddced598c4f92f7337da98bca668ebf99407f8f

Attempt to configure editors similarly

view details

Peter Law

commit sha 0af34c157dab960324fd44034e6e83095c4a5501

Convert to spaces

view details

push time in 6 hours

push eventPeterJCLaw/livestream-overlay

Peter Law

commit sha c0ac64e8482505efb94f111605fb4a8269feff4e

Fix indent

view details

Peter Law

commit sha 119d3da3d5785d57b6a4cd8d6af885eb727a5a74

Attempt to configure editors similarly

view details

push time in 6 hours

PR opened srobo/livestream-overlay

Whitespace fixes
+30 -30

0 comment

1 changed file

pr created time in 6 hours

create barnchPeterJCLaw/livestream-overlay

branch : whitespace-fixes

created branch time in 6 hours

issue commentsrobo/tasks

Arrange a live stream for the competition

Not sure if this is now a duplicate of the other livestream related tasks.

PeterJCLaw

comment created time in 6 hours

issue closedsrobo/tasks

Organise computer hardware for the competition

We will need a large number of computers for the competition. This ticket serves as a central place which records everything other than volunteers individual laptops.

In addition to the hardware for the individual dependencies noted below, we also need:

  • machines to run the network (if not provided by the venue)
  • machines for helpdesk (though this may be volunteers' laptops)

Original

comp/computer-hardware

Dependencies

  • ~#429 Organise computering kit for the competition reception desk~
  • ~#430 Organise drivers for the arena screens~
  • #431 Organise machine to run score entry

closed time in 6 hours

PeterJCLaw

issue commentsrobo/tasks

Organise computer hardware for the competition

Since the competition is virtual this year, the only computers we really need for the virtual competition are already covered by other tasks, specifically #584 and #537.

PeterJCLaw

comment created time in 6 hours

issue closedsrobo/tasks

How long before a match should teams submit their code?

This impacts the choices around live-ness (#590 )

Trade-off here is around the live-feel of the matches for teams and how much they feel they can edit their code as they go

Proposed investigation: Time a full run-through of running simulation to finished video

closed time in 6 hours

RealOrangeOne

issue commentsrobo/tasks

How long before a match should teams submit their code?

Conclusion: this will be 10am on the morning for a 3pm livestream, see https://github.com/srobo/tasks/issues/590#issuecomment-653775787. https://github.com/srobo/tasks/issues/606 for updating the website.

RealOrangeOne

comment created time in 6 hours

issue closedsrobo/tasks

Work out the day schedules for the competition

We need a list of what is happening at what times on the days of the competition:

  • [x] ~What dates are we exactly going for?~ (done, see website)
  • [x] Are we broadcasting all the sessions for a weekend in one go, or are we doing separate rounds? (solved: we're having two sessions per weekend, each having 2-3 rounds of matches)
  • [x] How many matches are we going to run? (solved: we're having two sessions per weekend, each having 2-3 rounds of matches)
    • Depends somewhat on the number of teams (we currently have 12 teams)
  • [ ] What times are we running the broadcasts?
    • suggestion A) both on Sunday: 11:30 and 14:00
    • suggestion B) same time both days, perhaps late afternoon
    • this is likely blocked on #590

Original

comp/day-schedule

closed time in 6 hours

PeterJCLaw

issue commentsrobo/tasks

Work out the day schedules for the competition

Done in https://github.com/srobo/tasks/issues/590#issuecomment-653775787.

PeterJCLaw

comment created time in 6 hours

issue closedsrobo/tasks

Work out how we're going to run the simulation for the competition

Are we pre-recording or live-running simulations?

How do we apply the commentator audio to the livestream (assume it comes from somewhere)

This impacts how long teams have between submitting their code and their match.

closed time in 6 hours

RealOrangeOne

issue commentsrobo/tasks

Work out how we're going to run the simulation for the competition

Conclusion: we're going to pre-record the matches and play them back for the live stream. The minimal solution is that the playback is manually triggered, though if we can automate this then that would be awesome.

Code submission will be ~hours ahead of the streams to account for this.

We'd like to run Saturday and Sunday leagues on both weekends. The knockouts will run on the Saturday.

https://github.com/srobo/tasks/issues/606 to update the website with this.

RealOrangeOne

comment created time in 6 hours

issue openedsrobo/tasks

Update website with competition timings

Specifically:

  • code submission by 10am on the morning of
  • livestreams at 3pm - 4:30pm
  • league matches on both days of the weekend
  • knockout on the Saturday

created time in 6 hours

more