Go to Post I guess you really do learn something new everytime you go to a FIRST competition. - Elgin Clock [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 02-02-2011, 10:33
enbug enbug is offline
Registered User
FRC #1884 (Griffins)
 
Join Date: Jan 2011
Rookie Year: 2011
Location: London
Posts: 14
enbug is an unknown quantity at this point
JSP

Can the robot run Java Server Pages? And, can it respond to AJAX reasonably quickly? Thinking of having a webpage display where we are on the field, as a driving aid.
Reply With Quote
  #2   Spotlight this post!  
Unread 02-02-2011, 10:54
basicxman basicxman is offline
Emily Horsman
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Burlington, Ontario
Posts: 971
basicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant future
Send a message via AIM to basicxman Send a message via MSN to basicxman Send a message via Yahoo to basicxman
Re: JSP

I'm definitely not a Java guy, but I know the cRio-FRC platform has been designed with Java Micro Edition and I cannot find any information explicitly stating that JME won't work with JSP.

The cRio is quite fast but I don't think it would be capable of running a web framework and handling a request density (additionally to running robot code, with the watchdog) your application would use.

While a great idea (and you have lots more to consider besides just displaying the information), this sounds like a Dashboard application.
Reply With Quote
  #3   Spotlight this post!  
Unread 02-02-2011, 10:55
jtdowney jtdowney is offline
Boiler Up
AKA: John Downey
FRC #4302 (Robophins)
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2006
Location: Chicago
Posts: 300
jtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant future
Re: JSP

I am not an expert on Java Server Pages but I doubt it would run on the Squawk VM that the cRIO uses. Squawk is a J2ME (mobile edition) VM and was not intended to host servlets.
__________________
John Downey
Lead Robot Inspector - Purdue IndianaFIRST District
Whitney Young Magnet High School/Robophins (FRC 4302) - Mentor (2013-current)
Midwest Regional Planning Committee - Member (2012-current)
Boilermaker Regional Planning Committee - Member (2011-2014)
Robot Inspector (2008-current)
Purdue FIRST Programs - Staff Advisor (2008-2011)
Lafayette-Jefferson High School/Precision Guessworks (FRC 1646) - Mentor (2006-2011)
Reply With Quote
  #4   Spotlight this post!  
Unread 03-02-2011, 02:24
enbug enbug is offline
Registered User
FRC #1884 (Griffins)
 
Join Date: Jan 2011
Rookie Year: 2011
Location: London
Posts: 14
enbug is an unknown quantity at this point
Re: JSP

Ok, can the cRIO send AJAX requests to a server running on a different computer, on the local network? I just need to send around five integers fifteen to twenty times a second.
Reply With Quote
  #5   Spotlight this post!  
Unread 03-02-2011, 03:23
sjspry sjspry is offline
Registered User
FRC #1984
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Kansas
Posts: 125
sjspry has a spectacular aura aboutsjspry has a spectacular aura aboutsjspry has a spectacular aura about
Re: JSP

The software stack you want to use would be the wrong one for the job. Just sending the integers to some software would be easier and the best choice (think Dashboard of some kind, hint hint); if you insist on using a web-based interface you might be able to get something running with a keep-alive connection and Javascript (similar to how the Axis Camera updates the images it receives in the web viewer for the MJPG stream). Note you will have to implement basically everything.

As for performance, the cRIO will be able to max-out the router and computer information wise while still leaving reasonable time (at least this was true in my tests) for control code (don't think about image processing, though), so it would make sense it could compute a HTML page a send it repeatedly. As for actually making sure the page is sent on the cRIO, you'd have to implement (at least) the GET method as defined in the HTTP RFC.

Basically, look for the string "GET <path>", where <path> is "/index.html" or similar. Return the page with "200 OK\r\nContent-Length: <length in bytes>\r\n<content>". I think this is all you should need to get Firefox/similar to accept it in some sort of compatibility mode. Do some experimenting with some of the various Firefox/similar add-ons, or look at the RFC for some basic commands (like "GET" and "HEAD") and open a connection in Java and print out the results to see what a valid header looks like.
Reply With Quote
  #6   Spotlight this post!  
Unread 03-02-2011, 12:17
enbug enbug is offline
Registered User
FRC #1884 (Griffins)
 
Join Date: Jan 2011
Rookie Year: 2011
Location: London
Posts: 14
enbug is an unknown quantity at this point
Re: JSP

Ok, you may be right. I wanted to send a set of coordinates to a computer other than the FRC laptop, which could then render a 3d scene using those coordinates. (Is it legal to use another computer at the driving station just to display information?) If I can use the dashboard, then I would, but the FRC laptop can't handle the rendering, so I wanted to use another computer.
Reply With Quote
  #7   Spotlight this post!  
Unread 03-02-2011, 13:37
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,572
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: JSP

Quote:
Originally Posted by enbug View Post
Ok, you may be right. I wanted to send a set of coordinates to a computer other than the FRC laptop, which could then render a 3d scene using those coordinates. (Is it legal to use another computer at the driving station just to display information?) If I can use the dashboard, then I would, but the FRC laptop can't handle the rendering, so I wanted to use another computer.
See <R75>.
Reply With Quote
  #8   Spotlight this post!  
Unread 03-02-2011, 15:05
sjspry sjspry is offline
Registered User
FRC #1984
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Kansas
Posts: 125
sjspry has a spectacular aura aboutsjspry has a spectacular aura aboutsjspry has a spectacular aura about
Re: JSP

Quote:
Originally Posted by enbug View Post
Ok, you may be right. I wanted to send a set of coordinates to a computer other than the FRC laptop, which could then render a 3d scene using those coordinates. (Is it legal to use another computer at the driving station just to display information?) If I can use the dashboard, then I would, but the FRC laptop can't handle the rendering, so I wanted to use another computer.
You can just use that other computer as your driver station. As for on the field, it seems allowable to have two computers linked together, but they both can't be using wireless.
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 11:18.

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