Go to Post your robot may have a bit of a "pimpwalk" - GMKlenklen [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-05-2016, 11:59
teku14's Avatar
teku14 teku14 is offline
http:
FRC #2614 (MARS)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Morgantown, WV
Posts: 64
teku14 is a jewel in the roughteku14 is a jewel in the roughteku14 is a jewel in the roughteku14 is a jewel in the rough
Make the RoboRIO serve HTML like the NI WebDash

Hello everyone,

I was wondering if there was a way that one could create and deploy your own web applications to the RoboRIO like how the NI WebDash application is accessible through the browser at the roboRIO-[teamnumber]-frc.local URL.

Thanks!
Reply With Quote
  #2   Spotlight this post!  
Unread 01-05-2016, 12:56
SamCarlberg's Avatar
SamCarlberg SamCarlberg is offline
GRIP, WPILib. 2084 alum
AKA: Sam Carlberg
no team
Team Role: Mentor
 
Join Date: Nov 2015
Rookie Year: 2009
Location: MA
Posts: 45
SamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to behold
Re: Make the RoboRIO serve HTML like the NI WebDash

You'd have to roll your own HTTP server and connect it to one of the ports that the FMS keeps open. Looks like ports 5800-5810 are the best ones to use according to the FMS whitepaper.
__________________
WPILib
GRIP, RobotBuilder
Reply With Quote
  #3   Spotlight this post!  
Unread 01-05-2016, 13:14
teku14's Avatar
teku14 teku14 is offline
http:
FRC #2614 (MARS)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Morgantown, WV
Posts: 64
teku14 is a jewel in the roughteku14 is a jewel in the roughteku14 is a jewel in the roughteku14 is a jewel in the rough
Re: Make the RoboRIO serve HTML like the NI WebDash

So this HTTP server would be in addition or separate from the existing one that serves the NI WebDash?
Reply With Quote
  #4   Spotlight this post!  
Unread 01-05-2016, 13:34
SamCarlberg's Avatar
SamCarlberg SamCarlberg is offline
GRIP, WPILib. 2084 alum
AKA: Sam Carlberg
no team
Team Role: Mentor
 
Join Date: Nov 2015
Rookie Year: 2009
Location: MA
Posts: 45
SamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to beholdSamCarlberg is a splendid one to behold
Re: Make the RoboRIO serve HTML like the NI WebDash

It would be it's own application running on the RoboRIO. You can't change the NI WebDash.
__________________
WPILib
GRIP, RobotBuilder
Reply With Quote
  #5   Spotlight this post!  
Unread 01-05-2016, 22:23
virtuald's Avatar
virtuald virtuald is offline
RobotPy Guy
AKA: Dustin Spicuzza
FRC #1418 (), FRC #1973, FRC #4796, FRC #6367 ()
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2003
Location: Boston, MA
Posts: 1,032
virtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant futurevirtuald has a brilliant future
Re: Make the RoboRIO serve HTML like the NI WebDash

You certainly can put an HTTP server on the roborio, but I would recommend putting the HTTP server on your driver station, and communicate with the robot via networktables. Check out pynetworktables2js for a project that lets you easily build your own dashboards using HTML/JS.
__________________
Maintainer of RobotPy - Python for FRC
Creator of pyfrc (Robot Simulator + utilities for Python) and pynetworktables/pynetworktables2js (NetworkTables for Python & Javascript)

2017 Season: Teams #1973, #4796, #6369
Team #1418 (remote mentor): Newton Quarterfinalists, 2016 Chesapeake District Champion, 2x Innovation in Control award, 2x district event winner
Team #1418: 2015 DC Regional Innovation In Control Award, #2 seed; 2014 VA Industrial Design Award; 2014 Finalists in DC & VA
Team #2423: 2012 & 2013 Boston Regional Innovation in Control Award


Resources: FIRSTWiki (relaunched!) | My Software Stuff
Reply With Quote
  #6   Spotlight this post!  
Unread 02-05-2016, 22:30
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 800
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: Make the RoboRIO serve HTML like the NI WebDash

I've been using seasocks to very good success for a number of projects. Fast, lightweight, and has websocket support. https://github.com/mattgodbolt/seasocks
Reply With Quote
  #7   Spotlight this post!  
Unread 02-05-2016, 23:10
connor.worley's Avatar
connor.worley connor.worley is offline
Registered User
FRC #0973 (Greybots)
Team Role: Mentor
 
Join Date: Mar 2011
Rookie Year: 2010
Location: Berkeley/San Diego
Posts: 597
connor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond reputeconnor.worley has a reputation beyond repute
Re: Make the RoboRIO serve HTML like the NI WebDash

mongoose is another option.
__________________
Team 973 (2016-???)
Team 5499 (2015-2016)
Team 254 (2014-2015)

Team 1538 (2011-2014)
2014 Driver (25W 17L 1T)
日本語でOK
Reply With Quote
  #8   Spotlight this post!  
Unread 02-05-2016, 23:19
apache8080 apache8080 is offline
Lead Programmer, Drive Coach, Scout
AKA: Rishi Desai
FRC #5677
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: San Jose, CA
Posts: 36
apache8080 is on a distinguished road
Re: Make the RoboRIO serve HTML like the NI WebDash

254 also built a web server on the RoboRio in java that serves javascript and html pages for a web based dashboard. Here is the link to their code.
Reply With Quote
  #9   Spotlight this post!  
Unread 03-05-2016, 00:13
nickbrickmaster's Avatar
nickbrickmaster nickbrickmaster is offline
Captain
AKA: Nick Schatz
FRC #3184 (Blaze Robotics)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Eagan MN
Posts: 143
nickbrickmaster is an unknown quantity at this point
Re: Make the RoboRIO serve HTML like the NI WebDash

Python also has a simple server built in. Can do python CGI as well.
__________________
I have approximate knowledge of many things.

FRC 3184: 2014-, FTC 10648: 2015-
Reply With Quote
  #10   Spotlight this post!  
Unread 03-05-2016, 05:44
ArthurA's Avatar
ArthurA ArthurA is offline
I think that I'm registered???
FRC #4774 (The DropBears)
Team Role: Programmer
 
Join Date: Dec 2014
Rookie Year: 2014
Location: Sydney, Australia
Posts: 26
ArthurA has a spectacular aura aboutArthurA has a spectacular aura about
Re: Make the RoboRIO serve HTML like the NI WebDash

Quote:
Originally Posted by virtuald View Post
You certainly can put an HTTP server on the roborio, but I would recommend putting the HTTP server on your driver station, and communicate with the robot via networktables. Check out pynetworktables2js for a project that lets you easily build your own dashboards using HTML/JS.
Team 4774 used this for our dashboard this year, and we found it really simple, useful, and great for making modifications for the drivers during comp. You can find our code here.
Reply With Quote
  #11   Spotlight this post!  
Unread 03-05-2016, 10:36
teku14's Avatar
teku14 teku14 is offline
http:
FRC #2614 (MARS)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Morgantown, WV
Posts: 64
teku14 is a jewel in the roughteku14 is a jewel in the roughteku14 is a jewel in the roughteku14 is a jewel in the rough
Re: Make the RoboRIO serve HTML like the NI WebDash

We're a labview team. I know the poofs have done this but that's written in Java and they are able to import libraries and such. So I assume it requires the JRE installed to run? Also, I believe there some VIs for running a web service that I saw built into the default labview palette. They're also available to run on RT targets such as the Rio. I'm just exploring options here. I did find virtuald's suggestion interesting.

Last edited by teku14 : 03-05-2016 at 10:45.
Reply With Quote
  #12   Spotlight this post!  
Unread 03-05-2016, 10:42
teku14's Avatar
teku14 teku14 is offline
http:
FRC #2614 (MARS)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2013
Location: Morgantown, WV
Posts: 64
teku14 is a jewel in the roughteku14 is a jewel in the roughteku14 is a jewel in the roughteku14 is a jewel in the rough
Re: Make the RoboRIO serve HTML like the NI WebDash

Quote:
Originally Posted by ArthurA View Post
Team 4774 used this for our dashboard this year, and we found it really simple, useful, and great for making modifications for the drivers during comp. You can find our code here.
I took a look at the code through my phone and it seems really cool. One question however. Did you guys have a camera feed on this dashboard?

Last edited by teku14 : 03-05-2016 at 10:45.
Reply With Quote
  #13   Spotlight this post!  
Unread 03-05-2016, 11:03
JesseK's Avatar
JesseK JesseK is offline
Expert Flybot Crasher
FRC #1885 (ILITE)
Team Role: Mentor
 
Join Date: Mar 2007
Rookie Year: 2005
Location: Reston, VA
Posts: 3,608
JesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond reputeJesseK has a reputation beyond repute
Re: Make the RoboRIO serve HTML like the NI WebDash

Quote:
Originally Posted by apache8080 View Post
254 also built a web server on the RoboRio in java that serves javascript and html pages for a web based dashboard. Here is the link to their code.
Unfortunately, they never got this working on an official field. We couldn't get the robot to connect to our Node server on the driver's station laptop while on the field either, even with static IP's.

In drilling down into what happens with FIRST HQ's guys, the match pre-start stuff completely re-configures the network at the router when a the field goes from one match to the next. If a team plugs their laptop into the driver's station before field pre-start, they have connected to the network of the prior team. With static IP's and a proper netmask this is solved in theory, but we couldn't get it working. So NetworkTables it was.

I'm going to work on a direct Java implementation for NetworkTables. There is absolutely no need for JNI to be involved, and a direct Java implementation would resolve some of the shared resource issues that it looks like ntcore specifically designs for. The better reason though, is that I want runtime control over the data rate for certain sensors so we can collect better telemetry from a match.
__________________

Drive Coach, 1885 (2007-present)
CAD Library Updated 5/1/16 - 2016 Curie/Carver Industrial Design Winner
GitHub

Last edited by JesseK : 03-05-2016 at 11:09.
Reply With Quote
  #14   Spotlight this post!  
Unread 03-05-2016, 11:16
TheOtherGuy's Avatar
TheOtherGuy TheOtherGuy is offline
Unregistered User
AKA: Kevin Forbes
FRC #4183 (Bit Buckets)
Team Role: Engineer
 
Join Date: Jul 2006
Rookie Year: 2006
Location: Tucson, AZ
Posts: 408
TheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond reputeTheOtherGuy has a reputation beyond repute
Re: Make the RoboRIO serve HTML like the NI WebDash

Check out Spark, you can get a server up and running on an FRC robot in minutes, not hours or days:

http://sparkjava.com/
__________________
Reply With Quote
  #15   Spotlight this post!  
Unread 03-05-2016, 13:51
Peter Johnson Peter Johnson is offline
WPILib Developer
FRC #0294 (Beach Cities Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 243
Peter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud ofPeter Johnson has much to be proud of
Re: Make the RoboRIO serve HTML like the NI WebDash

Quote:
Originally Posted by JesseK View Post
I'm going to work on a direct Java implementation for NetworkTables. There is absolutely no need for JNI to be involved, and a direct Java implementation would resolve some of the shared resource issues that it looks like ntcore specifically designs for. The better reason though, is that I want runtime control over the data rate for certain sensors so we can collect better telemetry from a match.
I would be careful in rolling your own implementation. Generally speaking, network stuff is easy to get wrong and may either not work or use large amounts of wifi airtime in the various network environments used in FIRST (and our friend Murphy says this will happen at the worst possible time). Part of the goal of ntcore was to get as many languages as possible using the same tested and proven network code. I'm not sure what "shared resource issues" you're talking about with ntcore, but bug reports are happily accepted.

The runtime control of update frequency for certain sensors is something I'll be working on adding to ntcore this summer; do you really want different sensors individually updating at different rates, or would a "fast/slow" (e.g. only 2 levels) be sufficient? Would a "pull" (vs the current "push") methodology for updating values be preferred? This is possible to implement on top of ntcore, as there's flush functionality available to synchronize updates to a timed loop. Currently the flush is rate-limited to 10 Hz, but we will also be looking at changing the rate limits based on team feedback from this season, and perhaps provide a UDP option for higher-rate updates (with the tradeoff of accepting the possibility some of these updates will be dropped).

NTcore is an open source project; feel free to file a bug report on GitHub for any of these concerns and we can have a more detailed discussion in that environment.
__________________
Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC

2010 FRC World Champions (294, 67, 177)
2007 FTC World Champions (30, 74, 23)
2001 FRC National Champions (71, 294, 125, 365, 279)
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:38.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi