Introducing ZebraPlot: a Web-Based Viewer for Zebra Data

I’ve been in love with the Zebra MotionWorks technology since it was first introduced to FRC a few years ago. It’s amazing that it’s spreading to a number of in-season competitions this year; I can’t wait for it to be part of the official field at all events. And now with the support of TheBlueAlliance, the data is much more accessible than it’s been in previous years.

I was inspired by @MikLast’s ZEBRA Parser for Excel/Tableau that automatically pulls the data from TBA’s API and converts it to a csv, which can be viewed through Tableau. The graphs look very nice, but the workflow is a bit difficult for me. Having to manually import the data to Tableau takes effort, and means you can only view the data on a computer that can run Tableau. Confronted with this problem, I set out to make a website that can make similar graphs from the comfort of your web browser.

Here’s what I’ve come up with: https://arimb.github.io/ZebraPlot/

It has three settings:

  • Heatmap shows the distribution of a team’s position across the field throughout all matches they played at that event so far
  • Auto Path shows the path the robot has taken through the first 15 seconds of every match they played at the event so far
  • Playback allows you to view any match as a video, showing the robots driving around the field

 
Right now the only data available via the TBA API is from 2019 Chezy Champs, which is obviously for the 2019 field. So you can take a look and play around with it, but you have to imagine the data overlaid on last year’s field instead. Once competitions start, I will get rid of Chezy Champs so all events will be from the 2020 season. If anyone finds bugs, or has comments, questions, or suggestions, I’m always open.

Good luck to everyone this season!

17 Likes

Looks awesome. Definitely easier than mine!

Some things ive noticed:

It looks like all auto paths are constrained to only the red side. Is this by design? This is 3476’s auto path data.

The other one is the “select team” option not working after your initial choosing, and being stuck refreshing any time I want to test something else.

I can’t click anything. Latest version of Chrome, Windows 10
Image from Gyazo

Also reported #1.

running 79.0.3945.117, no issues here. See if its an extension?

Looks like data is being normalized to red

Incognito with extensions disabled doesn’t make a difference :frowning:

This is very cool! Your heatmaps were the inspiration for the initial Zebra heatmaps in our demonstration viewer, terrific to see them in your web based interface! Looks like the field map dimensions don’t quite line up with the plot dimensions of the data, but that’s an easy fix. Great job @AriMB !

Yes, this is by design. Especially with the possibility for auto routines to cross the “center line” of the field this year, it makes sense to normalize the paths to one side. This way you can also see all of the paths on top of each other instead of seeing half on one side and half on the other.

That’s what I get for releasing at 3am after making last minute GUI changes instead of waiting till the next morning to double check everything works properly. These are actually the same problem, where the overlay canvas accidentally extends to cover the menu bar instead of starting at the top of the image. Should be fixed now.

3 Likes

You may wish to update your event list to include Indiana Robotics Invitational for 2019 (2019iri) as I have just uploaded that events Zebra MotionWorks data.

3 Likes

Thanks, I just added IRI to the list of events so now there are two sample events. Once competition season starts I’ll update the event list to the final version and remove both of the 2019 events so all of the events are form the current year.

2 Likes

It seems like there’s a glitch where when zebra data is unavailable for a given match that a team played in, the heatmap gets a 404 error from TBA and never loads. For instance, apparently Clackamas SF1M3 data was never recorded due to a software glitch, and that makes it impossible to load data for 1540, 2471, and everyone else who happened to be in that match.

1 Like

Thanks for letting me know. I added some error handling that should take care of this case. Let me know if you find any other bugs that need squashing :smile:

Also now that we have real data, the auto path mode looks really cool with this year’s data and true auto paths (instead of last year’s sandstorm). Here’s 1540 from PNW Clackmas, who clearly ran the same auto every match*:

And 4911 from PNW Glacier Peak, who clearly had two different auto modes they ran:

 
* It looks like they may have changed their path at some point during the event

5 Likes

We didn’t change anything about the path. However, the six-ball auto that we ran every match grabs the three balls from the trench and then backs up (along a slightly different path) to where it started on the initiation line in order to take a shot with better accuracy. So, the bottom path is the robot going to grab the balls, while the upper one is us returning for the shot.

1 Like

Yes and no, Data was in fact recorded but since it was a tiebreaker AND there was a substitution, our initial TBA upload attempt bounced.

There is an issue with early Glacier and Greenville events which caused some bouncy data points. We believe this can be recovered for those events and we will re-upload. This issue was already fixed for week 2 events

Can you elaborate on “bounced”? I can check the logs to see if there’s anything we should be fixing.

1 Like

Sorry we got:

image
which appears to be related to a substitution for that match.

I don’t have a screenshot for the other but I’ll look through the logs to confirm what we got for SF1.3

1 Like

Cool - here’s the code in question for that message.

Being related to backup substitutions is an plausible theory; TBA asserts that the teams in the data payload match the ones FMS publishes for that match. So for 2020orore_qf3m2 the expected teams are

$ curl -s -H "X-TBA-Auth-Key:$TBA_KEY" https://www.thebluealliance.com/api/v3/match/2020orore_qf3m2 | jq -r '"blue - \(.alliances.blue.team_keys) red - \(.alliances.red.team_keys)"'
blue - ["frc5803","frc2521","frc7448"] red - ["frc2990","frc3636","frc1432"]
1 Like


Some teams have really pretty auto routines this year. I wish I could have watched the stream

Very cool. Is there any plan or ability to capture events/actions not just paths. I’d be interesting to see where and when teams are shooting from. Probably impossible would be tracking accuracy rates. Especially this year, it’d be fun to track accuracy at the beginning of tournaments vs later.