Go to Post It's a bit sad, really, because FIRST has already reached other countries and there are some U.S. states that still are unaware of what FIRST is!! - tribotec_ca88 [more]
Home
Go Back   Chief Delphi > Technical > Control System > FRC Control System
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 27-08-2012, 11:20
JHebes's Avatar
JHebes JHebes is offline
Registered User
AKA: Josh Hebert
FRC #3467
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2011
Location: Windham, NH
Posts: 3
JHebes is an unknown quantity at this point
Control Robot through HTML/JavaScript Page

I have a question regarding controlling a robot view a web interface. Naturally, in competition, I would be unable to access this "control page" through a web browser. So, my question is, is it possible to render a webpage in the driverstation and use the driverstation to relay form data to the robot?
Reply With Quote
  #2   Spotlight this post!  
Unread 27-08-2012, 13:39
Foster Foster is offline
Engineering Program Management
VRC #8081 (STEMRobotics)
Team Role: Mentor
 
Join Date: Jul 2007
Rookie Year: 2005
Location: Delaware
Posts: 1,373
Foster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond reputeFoster has a reputation beyond repute
Re: Control Robot through HTML/JavaScript Page

Quote:
... is it possible ...
So as an engineer you are constrained mostly by the laws of physics and available cash (1).

I think what you asked for is

Code:
Browser/Javascript <---> Driver Station <---> Robot
and I'll posit that you could put an ActiveX control on the DS and have it fill the blanks in.

OTOH, I have to ask why? There will be pretty decent lag between the browser and the DS, so any real time control is going to be hard. And during a match, the DS/Robot are on a closed network, so you won't be able to get to it from the outside.

Thanks!

(1) I used to say "laws of physics, time and cash; but a roboteer pointed out that going back or stopping time would break the physics part, so I shortened it.
__________________
Foster - VEX Delaware - 17 teams -- Chief Roboteer STEMRobotics.org
2010 - Mentor of the Year - VEX Clean Sweep World Championship
2006-2016, a decade of doing VEX, time really flies while having fun
Downingtown Area Robotics Web site and VEXMen Team Site come see what we can do for you.
Reply With Quote
  #3   Spotlight this post!  
Unread 27-08-2012, 20:05
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Control Robot through HTML/JavaScript Page

You can render a web page in the dashboard, especially if the dashboard is a web browser. You can set the command line in the .ini file located in Public Documents\FRC\FRC DS Data Storage.ini. I'm not certain how to open a web page from a command line, but I suspect you can find a way.

Next would be to find a way to set network variables from a web page. This seems pretty useful for choosing or influencing auto.

Greg McKaskle
Reply With Quote
  #4   Spotlight this post!  
Unread 27-08-2012, 20:11
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,182
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: Control Robot through HTML/JavaScript Page

Quote:
Originally Posted by Greg McKaskle View Post
You can render a web page in the dashboard, especially if the dashboard is a web browser. You can set the command line in the .ini file located in Public Documents\FRC\FRC DS Data Storage.ini. I'm not certain how to open a web page from a command line, but I suspect you can find a way.

Next would be to find a way to set network variables from a web page. This seems pretty useful for choosing or influencing auto.

Greg McKaskle
Yeah, we used Chrome as our Dashboard this year. (Mostly just to grab some stuff from the camera and draw on top of it)

Web config baked in to the cRIO would be nice. I've seen some projects around here that used the HTTP server built in to Boost to do this in C++. There's probably a Java HTTP server that will run on J2ME as well.

Side note:
We also used a browser to debug our robot during build. A server running on a development machine served a page and had WebSocket capabilities. It created a tunnel between the websocket and a UDP connection to the robot, making it easy to post things from the robot to the laptop and vice versa. The intermediate step was done mostly because we lacked a HTTP server for the robot and this was the second best and first easiest solution. All of these things make me think this route is absolutely possible

Last edited by Tom Bottiglieri : 27-08-2012 at 20:15.
Reply With Quote
  #5   Spotlight this post!  
Unread 27-08-2012, 21:27
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: Control Robot through HTML/JavaScript Page

As others have mentioned, it's possible, but I think SmartDashboard will provide better functionality vs setup effort when it comes to sending simple data.
__________________
Team 973 (2016-???)
Team 5499 (2015-2016)
Team 254 (2014-2015)

Team 1538 (2011-2014)
2014 Driver (25W 17L 1T)
日本語でOK
Reply With Quote
  #6   Spotlight this post!  
Unread 28-08-2012, 11:52
Bryce Paputa's Avatar
Bryce Paputa Bryce Paputa is offline
FF TSL: Frog Farce
FRC #0503 (Frog Force)
Team Role: Alumni
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Novi Michigan
Posts: 454
Bryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond reputeBryce Paputa has a reputation beyond repute
Re: Control Robot through HTML/JavaScript Page

You could set up an Apache server with PHP that had a serial connection to the robot. I would make it so that there was a python script (just because I like python and it's I/O) constantly checking a file and outputting it's contents to serial, while you have a PHP file that javascript could "call", that would write what the javascript told it to, to the file that python was checking. You could probably do it all of over PHP (or all python), but I am not sure how. Smart dashboard is probably easier.
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 21:20.

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