Go to Post Whether or not your team has the technical mentors, as long as your kids are still inspired by the adult technical mentors of other teams, and get the picture that we're trying to portray in this program, the best that you can do is the best you can do. Do it, and be proud of your results. - Beth Sweet [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 01-28-2013, 10:35 PM
l0stboy l0stboy is offline
Registered User
FRC #4064 (InZombiacs)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: United States
Posts: 22
l0stboy is an unknown quantity at this point
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.
__________________

Pedro
Ocala InZombiacs
Reply With Quote
  #2   Spotlight this post!  
Unread 01-28-2013, 11:06 PM
~Cory~'s Avatar
~Cory~ ~Cory~ is offline
Student
AKA: Cory Rypkema
FRC #0706
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Worcester MA
Posts: 216
~Cory~ is a splendid one to behold~Cory~ is a splendid one to behold~Cory~ is a splendid one to behold~Cory~ is a splendid one to behold~Cory~ is a splendid one to behold~Cory~ is a splendid one to behold~Cory~ is a splendid one to behold
Re: Can't figure out Roborealm. Need distance variable

Use a "Set Variable" module to rename the variable
Click image for larger version

Name:	Capture.PNG
Views:	58
Size:	5.6 KB
ID:	13709
__________________
corin.rypkema.org
WPI Class of '17
'12 Dean's List Finalist, Mentor of 706 - Cyberhawks
Reply With Quote
  #3   Spotlight this post!  
Unread 01-30-2013, 09:00 PM
l0stboy l0stboy is offline
Registered User
FRC #4064 (InZombiacs)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: United States
Posts: 22
l0stboy is an unknown quantity at this point
Re: Can't figure out Roborealm. Need distance variable

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
Ocala InZombiacs
Reply With Quote
  #4   Spotlight this post!  
Unread 02-01-2013, 03:40 PM
RoboRealm RoboRealm is offline
Registered User
FRC #0443
 
Join Date: Nov 2011
Location: United States
Posts: 34
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: Can't figure out Roborealm. Need distance variable

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.
Reply With Quote
  #5   Spotlight this post!  
Unread 02-03-2013, 11:11 PM
l0stboy l0stboy is offline
Registered User
FRC #4064 (InZombiacs)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: United States
Posts: 22
l0stboy is an unknown quantity at this point
Re: Can't figure out Roborealm. Need distance variable

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)
{
}
__________________

Pedro
Ocala InZombiacs
Reply With Quote
  #6   Spotlight this post!  
Unread 02-04-2013, 02:09 AM
RoboRealm RoboRealm is offline
Registered User
FRC #0443
 
Join Date: Nov 2011
Location: United States
Posts: 34
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: Can't figure out Roborealm. Need distance variable

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.
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 04:32 PM.

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