Go to Post "Oblivious" people asking questions are what gives us an excuse to sit around on CD. - Ryan M. [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 12-02-2013, 19:30
IDKnow IDKnow is offline
Registered User
FRC #1671
 
Join Date: Feb 2013
Location: California
Posts: 8
IDKnow is an unknown quantity at this point
Network Tables

Following the steps specified here:
http://wpilib.screenstepslive.com/s/...client-pc-side

I am unable to create a smart dashboard extension using the network tables. I have created and successfully used an image tracking program as an extension. This is not going to be beneficial, however, should I fail to send data.

I can put/get numbers on the robot side (C++) and have proven such with the table viewer app. As I said, however, an extension made as specified in the above documentation on a fully updated version of Netbeans; built and tried on several computers, just to be sure, will not function properly.

Is there something I am missing or some further documentation. Can anyone provide example code? As an alternative, is there a way to put numbers to the smart dashboard's network table with an extension on the smart dashboard (because there is are CPP get functions for the smart dashboard in robot code)?
Reply With Quote
  #2   Spotlight this post!  
Unread 12-02-2013, 20:12
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 590
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Network Tables

Can you try running the SmartDashboard from a command line (using CMD and the java -jar SmartDashboard.jar command) to verify that it's not throwing any exceptions.

In the SmartDashboard, NetworkTables is already initialized so you should not do the setClientMode() and setIPAddress() in your extension. Make sure those methods aren't being called in your code.

If you do see any exceptions coming out, please post them here so we can try to diagnose the problem.

Brad
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote
  #3   Spotlight this post!  
Unread 12-02-2013, 22:00
IDKnow IDKnow is offline
Registered User
FRC #1671
 
Join Date: Feb 2013
Location: California
Posts: 8
IDKnow is an unknown quantity at this point
Re: Network Tables

Via the link above, there is the category "The client (laptop) side of the program." Code exactly as is shown in this will not function. The robot side is also more or less as shown and will give/take values to/from the network table viewer.

Without the specified lines,
setClientMode() and setIPAddress()
there are no errors but also no connection. It will not print status as client with if (not server) print is client nor will it do the same with connection.

With them, there are also no errors but it continuously fails to connect.
Reply With Quote
  #4   Spotlight this post!  
Unread 12-02-2013, 22:26
IDKnow IDKnow is offline
Registered User
FRC #1671
 
Join Date: Feb 2013
Location: California
Posts: 8
IDKnow is an unknown quantity at this point
Re: Network Tables

Could I get a basic primer code in java for the client and cpp for the robot to start from?
Reply With Quote
  #5   Spotlight this post!  
Unread 27-02-2013, 15:47
twiggzee twiggzee is offline
Registered User
FRC #3502 (Octo-(PI)-Rates)
Team Role: Mentor
 
Join Date: Mar 2011
Rookie Year: 2011
Location: Tallahassee, FL
Posts: 55
twiggzee is an unknown quantity at this point
Re: Network Tables

I am having the same problem. I started with Daisy's vision code from last year and have modified it to fit our needs. The following line

Code:
Robot.getTable().putNumber("azimuth", azimuth);
prints a value to the SmartDashboard but I cannot retrieve the value from the robot side code:

Code:
SmartDashboard.getNumber("azimuth");
but i get an error saying that there is no such key. I played with this alot until I gave up and tried the NetworkTables method here but i can't seem to get it to work either.

With the following lines, I lose camera feed on the SmartDashboard:
Code:
NetworkTable.setClientMode();
NetworkTable.setIPAddress("10.35.2.2");
NetworkTable table = NetworkTable.getTable("visiondata");
.
.
.
table.putNumber("azimuth", azimuth);

When I comment out the first 2 of those 3, I get my camera stream back but still no data output.

Any ideas??
__________________
Wendy
Team 3502
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 10:43.

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