Log in

View Full Version : Announce: Write your dashboard using HTML/Javascript!


virtuald
29-03-2015, 02:00
Team 1418 and the RobotPy project are happy to announce the release of pynetworktables2js, a cross platform library that forwards NetworkTables key/values to a webpage, so that you can easily write a Driver Station Dashboard for your robot in HTML5 + JavaScript.

Because the communications layer uses NetworkTables, you can connect your web interface to all FRC languages (C++, Java, LabVIEW, Python).

The original working prototype for pynetworktables2js was originally created by 1418 student Leon Tan, and I've polished it and turned it into something that other teams can use. Team 1418 won an Innovation In Control award this weekend at the Greater DC regional, in part because of our shiny+functional HTML dashboard (look for a source code release soon!).

Lots of students and mentors know how to create simple web pages to display content, and there's lots of resources out there for creating dynamic content for webpages that use javascript. There is a lot of visually appealing content that others have created using web technologies -- why not leverage those resources to make something cool to control your robot?

For more information + API docs: http://pynetworktables2js.readthedocs.org/
For source code: https://github.com/robotpy/pynetworktables2js

weaversam8
09-04-2015, 06:53
Looks promising, I'll check this out when next season rolls around.

jtrv
10-04-2015, 15:25
I'll try it out once I get a chance but that won't be for a decent amount of time. Glad that someone finally made some improvements to Dashboard. It's so painful to use, yet so helpful.

Thanks for your work!

virtuald
10-04-2015, 16:17
I'll try it out once I get a chance but that won't be for a decent amount of time. Glad that someone finally made some improvements to Dashboard. It's so painful to use, yet so helpful.

Thanks for your work!

It's worth noting that at the moment the only thing that is really provided is the NetworkTables interface, so it's not *quite* a replacement for SmartDashboard. You'll have to write your own HTML/JS widgets and such -- but this is significantly easier than writing a SmartDashboard widget. I'm hoping over time that pynetworktables2js will be bundled with more and more functions/etc to make it even easier to bind a networktable variable to an HTML button/input/etc.

I'm aware of at least two efforts to create SmartDashboard-like things in HTML/JS, both of which use (or are transitioning to use) pynetworktables2js. Probably by the time next season rolls around they will be even more feature complete. :)

virtuald
12-04-2015, 22:37
Team 1418 has released our UI code today which uses pynetworktables2js, see the attached screenshot. It's functional and quite shiny looking, though the code isn't as polished as I would like. A lot of the HTML work was done by a student who didn't know how to program at all at the beginning of the season, but I think it turned out pretty well and he learned a lot. :)

https://github.com/frc1418/2015-ui