Can't figure out Roborealm. Need distance variable

Hello. I’m completely new to Roborealm, but I know my way around the WPI Java stuff. I’m having a hard time understanding the Roborealm tutorial. I have the given sequence of modules given here :http://www.roborealm.com/FRC2013/slide060.php

However, when I try to use Network Tables, I can’t seem to find the option to send the distance variables or have anything with “SmartDashboard” show up as it has it here: http://www.roborealm.com/help/Network_Tables.php

My end goal is to have Roborealm process the image in order to send over the distance variable to the cRIO for shooting processing.

Also, what would I use the SmartDashboard to do with the camera. I’m also having trouble getting the camera image showing up on the Driver Station.

Help would be very much appreciated.

Use a “Set Variable” module to rename the variable
Capture.PNG

Capture.PNG


Capture.PNG

So would the pane on the left be what we want to call the variable in Java and then the right is what the variable is in Roborealm?

Pedro,

The left is what exists in the network tables system, and the right is what exists in RoboRealm. So, yes, if you are using Java to access the network tables system then that would be the variable that you need to query i.e. /SmartDashboard/Distance. The reason for the /SmartDashboard/ prefix is so that it also shows up in the SmartDashboard app which uses that prefix as its namespace.

Note that we updated the robofile in

http://www.roborealm.com/FRC2013/slide060.php

to include the network tables module with the Set_Variable module to rename them into the SDB namespace.

STeven.

Ah, I get it now. So would my code look like this to get the distance value out of RoboRealm and into the cRIO?

NetworkTable server = NetworkTable.getTable(“SmartDashboard”);
try
{
System.out.println(server.getNumber(“Distance”, 0.0));
}
catch (TableKeyNotDefinedException ex)
{
}

Yup, that’s right. That’s why you need to rename or call the variable with the /SmartDashboard/ prefix in it. The call to getTable needs that.

STeven.