OCCRA
Go to Post I'm intrigued by the possibility of Mayan stadium sports, minus the whole sacrificing part. - AlecMataloni [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Events   CD-Media   CD-Spy   FRC-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-19-2013, 11:55 AM
1757 1757 is offline
Registered User
FRC #1757
 
Join Date: Oct 2012
Location: Westwood
Posts: 26
1757 is an unknown quantity at this point
RoboRealm API

Hey, it's me again.

I'm just wondering if anyone has a java program for printing data from the RoboRealm API, I have no idea how to use sockets to get data from roborealm.
Reply With Quote
  #2   Spotlight this post!  
Unread 01-19-2013, 12:26 PM
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 537
BradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud of
Re: RoboRealm API

Look through this post:

http://wpilib.screenstepslive.com/s/...client-pc-side

It shows how to write a program that uses NetworkTables for getting data between the robot program and a desktop program. At the bottom of the page it talks a little about RoboRealm. The idea is that RoboRealm will put the data from your processed image into some NetworkTable variables, then you can just read them on the robot.

You shouldn't have to write your own socket communications code (unless you want to).

That last example on the above web page also has a link to some RoboRealm help.

Does that help?

Brad
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #3   Spotlight this post!  
Unread 01-24-2013, 04:00 PM
java4first java4first is offline
(Java) Programming Mentor
AKA: Stu
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Nov 2010
Rookie Year: 2011
Location: Goffstown, NH
Posts: 43
java4first is an unknown quantity at this point
Re: RoboRealm API

If you want to do this without using the Network Tables, I can post some code we used last year to get RoboRealm processed responses back to the robot (we wrote a (server?) TCP/IP socket that the RoboRealm software connected to at the end of it's procesing chain, and sent the values down. They go as an XML-ish text string, and you have to parse / extract them when you get them. But it's pretty standard server socket stuff (for the version of Java we use).
Reply With Quote
  #4   Spotlight this post!  
Unread 01-26-2013, 08:29 AM
1757 1757 is offline
Registered User
FRC #1757
 
Join Date: Oct 2012
Location: Westwood
Posts: 26
1757 is an unknown quantity at this point
Re: RoboRealm API

Could you? That would be awesome. Currently running the standalone API from roborealm allows us to get the values, but using the networktables in roborealm slows down to around 1 frame every 45 seconds as the cpu jumps to around 55%. without the network tables module everything seems to work fine...
Reply With Quote
  #5   Spotlight this post!  
Unread 01-26-2013, 02:11 PM
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 537
BradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud ofBradAMiller has much to be proud of
Re: RoboRealm API

Can you confirm that using the 2013 version of WPILibJ and the 2013 version of RoboRealm that the frame rate is slowing that much? Is that a bug in something else on your system?

Thanks,
Brad
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #6   Spotlight this post!  
Unread 01-26-2013, 02:42 PM
RoboRealm RoboRealm is offline
Registered User
FRC #0443
 
Join Date: Nov 2011
Location: United States
Posts: 32
RoboRealm is a jewel in the roughRoboRealm is a jewel in the roughRoboRealm is a jewel in the roughRoboRealm is a jewel in the rough
Re: RoboRealm API

You probably want to ensure that you have the most recent version of RR since we've updated the Network Tables module in the past couple of days. Certainly using the API is possible but the Network Tables make things MUCH easier. You use the same url you initially used for the download to get the most recent version, it auto updates.

If you look at the little gray numbers on the right side of the pipeline they indicate how long each module is taking ... does the NT module show larger numbers than the others?

Also, what variables are you trying to send via Network Tables?

STeven.
Reply With Quote
  #7   Spotlight this post!  
Unread 02-01-2013, 09:18 AM
java4first java4first is offline
(Java) Programming Mentor
AKA: Stu
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Nov 2010
Rookie Year: 2011
Location: Goffstown, NH
Posts: 43
java4first is an unknown quantity at this point
Re: RoboRealm API

Sorry this has taken so long to get back ... I've been busy ;-)

We'll take a look at our RoboRealm performance this weekend as another data point (after we update).

But as promised, in case you decide to go with your own server - custom implementation, assuming this works with the 2013 version of RoboRealm (I won't know for sure until we try hooking it up to the robot this weekend), it worked for us last year. We created the server on the robot, and let the RoboRealm application running on the driver station laptop connect to it, and then send data down. Any book (or a Google search) on writing servers for J2ME should help - the biggest annoyance is that you have to read it a character at a time, as none of the normal Java stream stuff is available.

Let me know if you have any questions ...
Attached Files
File Type: java RoboRealmServer.java (11.2 KB, 13 views)
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:06 PM.

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


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