|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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)? |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
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. |
|
#4
|
|||
|
|||
|
Re: Network Tables
Could I get a basic primer code in java for the client and cpp for the robot to start from?
|
|
#5
|
|||
|
|||
|
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);
Code:
SmartDashboard.getNumber("azimuth");
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?? |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|