|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Weird networktables error?
We are having trouble with a networktables issue that randomly showed up without changing any code.....
Code:
NetworkTable networktable;
networktable.getTable("robo");
networktable.getNumber("x");
Code:
[cRIO] java.lang.ClassCastException: Expected object of type class java.lang.Double but got object of type class com.sun.squawk.StringOfBytes [cRIO] at edu.wpi.first.wpilibj.networktables2.NetworkTableNode.getDouble(NetworkTableNode.java:52) [cRIO] at edu.wpi.first.wpilibj.networktables.NetworkTable.getNumber(NetworkTable.java:294) |
|
#2
|
||||
|
||||
|
Re: Weird networktables error?
Are you sure the value your sending in RoboRealm is a double?
|
|
#3
|
|||
|
|||
|
Re: Weird networktables error?
It was working just two days ago with the same code and no modifications so I am fairly sure it is. Even if I wasn't, i'm using putnumber so it should still work even if it isn't.
|
|
#4
|
|||
|
|||
|
Re: Weird networktables error?
It seems it is an error with Roborealm not sending a double. Does anyone know how to get roborealm to send values as doubles?
|
|
#5
|
||||
|
||||
|
Re: Weird networktables error?
Quote:
My main problem is that the variable [BOUNDING_COORDINATES] does not update! Im able to send a string that has the different values of the bounding rects but when i move the robot the variable doesnt update it unless i change it to a different variable than change it back to [BOUNDING_COORDINATES] also, it seems that your unable to change the values of the keys. You have to get a new key but define it as a double before you use it |
|
#6
|
|||
|
|||
|
Re: Weird networktables error?
Quote:
|
|
#7
|
||||
|
||||
|
Re: Weird networktables error?
Quote:
to edfine it as a double, use NetworkTable.getTable(?).remove(your key) NetworkTable.getTable(?).putNumber(your key) |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|