View Single Post
  #2   Spotlight this post!  
Unread 24-01-2013, 20:13
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 543
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Issues with image processing with RoboRealm and Network Tables

Quote:
Originally Posted by Self.This() View Post
Hey guys,

We are having some problems with networking, specifically with communications between the cRIO and RoboRealm. In RoboRealm script, we do our image processing, and then use the Set Variables module to reset the FPS and IMAGE_COUNT variables to /tableName/FPS and /tableName/IMAGE_COUNT to enable use over the network. Then we use the Network_Tables module to send those two variables over the network and to receive variables written in Java, the X value of our joystick and just a static number called test. Finally we display all 4 of those variables over our image so we can compare the values we are getting. We also have the internal version of the IMAGE_COUNT variable displayed, not only the network specific one.

On the Java side, we are using the .getNumber("name", default_value) method to receive the IMAGE_COUNT and FPS values, and then we are using the putNumber("name", default_value) method to send the joystick X value and our static test variable.

We have opened a the table with the getTable("tableName") method, and it matches the name that we rename the variables to with the Set_Variables. We have all of our IP addresses set correctly, and there are communications.

We are getting some very interesting results. On the SmartDashboard and through TableViewer we get strange numbers. The actual IMAGE_COUNT value according to RoboRealms seems to go to the value, and the read FPS value according to RoboRealms does not directly translate to the Java-read IMAGE_COUNT. For example, if RoboRealms says the FPS is 29.4, the IMAGE_COUNT on the SmartDashboard/TableViewer will say it's 58 or something similar. The values do not seem to be related (even though in the given example it seems to be roughly double the FPS).

We can send the test variable and have that displays the correct value in RoboRealm, but we can not get the joystick value to update, it seems to show only the last read value by the joystick before disabling.

So our question is, how do you do successfully send data between Java and RoboRealm? We can post actual code from either end if needed.

Thanks!

-1245 Programmers
Im playing with it and its extremely buggy. IMAGE_COUNT will return the number of images processed. The variable you want is BOUNDARY_COORDINATES which is generated when using a blob_filter or a blob_replace

but the issue im currently working with is that RoboRealm only sends BOUNDAY_COORDINATES once than stops sending it.
Reply With Quote