|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
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).
|
|
#4
|
|||
|
|||
|
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...
|
|
#5
|
|||
|
|||
|
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 |
|
#6
|
|||
|
|||
|
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. |
|
#7
|
|||
|
|||
|
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 ... |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|