|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools |
Rating:
|
Display Modes |
|
#1
|
||||
|
||||
|
Using Network Tables
Can I send this line
ColorImage image = camera.getImage() to a folder on the driver station? |
|
#2
|
|||
|
|||
|
Re: Using Network Tables
NetworkTables doesn't send large data items like images from the robot to the laptop. However, if your goal is to process the image on the driver station computer, you can connect the camera to the switch on your robot and just open it from the laptop. There are several ways of doing that. You can write a program with RoboRealm for doing the image processing. You can write your own program using some library like OpenCV or the NIVision library, or you can make a SmartDashboard plugin that does the image processing.
If you want to do the vision processing on the robot, then there are some sample Java programs for robot-side target detection in NetBeans. Brad |
|
#3
|
||||
|
||||
|
Re: Using Network Tables
e/ Changing the focus of this thread!!
Whenever im using RoboRealms, I can add the Network Table widget to the current setup, set the ip to 10.16.84.2, set the default camera to none, but when i run the program its not going to the axis camera on the robot its booting my webcam! Options>Video>Camera only has two settings, Nothing and my camera. (default to nothing) Last edited by Arhowk : 19-01-2013 at 15:10. |
|
#4
|
|||
|
|||
|
Re: Using Network Tables
I'm not sure what you are asking, but you can access the ip of the camera and see the feed from any computer.
|
|
#5
|
||||
|
||||
|
Re: Using Network Tables
Quote:
|
|
#6
|
||||
|
||||
|
Re: Using Network Tables
Quote:
how do i instantiate a network table? cameraTable = NetworkTable.getTable("RoboRealm"); gives me an error Illegal State Exception : network table already initialized (if i catch the error, it does nothing) e/ nevermind. current problem = Code:
public void testPeriodic() {
enabledPeriodic();
NetworkTable server = NetworkTable.getTable("SmartDashboard");
try
{
System.out.println(server.getNumber("IMAGE_COUNT", -1.0));
}
catch (TableKeyNotDefinedException ex)
{
}
}
my robo builder setup: Axis_Internet_Camera 10.16.84.11 Threshhold 200-255 (sat) Fill 500 Convex Hull set IMAGE_COUNT = /SmartDashboad/IMAGE_COUNT Network_Tables (port 1765, ip 10.16.84.2, send : IMAGE_COUNT) Last edited by Arhowk : 19-01-2013 at 17:24. |
|
#7
|
||||
|
||||
|
Re: Using Network Tables
So... is there a way to have the Roborealm server process the Axis camera images, then send those images to the SmartDashboard so that we can see the processed output?
|
|
#8
|
|||
|
|||
|
Re: Using Network Tables
You can try using the TableViewer to ensure that the key that you are expecting is actually in NetworkTables. You can find it in C:/Users/YOURUSERNAME/sunspotfrcsdk/tools/TableViewer-VERSION.jar
This will allow you to connect to a networktables server and view the raw entries. |
|
#9
|
||||
|
||||
|
Re: Using Network Tables
Quote:
(yes, just have roborealm save to a file than have smartdashboard read to file) Quote:
|
|
#10
|
||||
|
||||
|
Re: Using Network Tables
bump...
set IMAGE_COUNT = /SmartDashboard/IMAGE_COUNT in RoboRealm isnt working and it keeps saving to IMAGE_COUNT. What would the proper configuration be for seting IMAGE_COUNT to /SmartDashboard/IMAGE_COUNT OR can i get IMAGE_COUNT from the crio root? (to rehash the thread) |
|
#11
|
||||
|
||||
|
Re: Using Network Tables
Quote:
The left side is for the variable you are setting. The right is for setting the value of that varaible. |
|
#12
|
||||
|
||||
|
Re: Using Network Tables
Quote:
ok i got that. it didnt work. than i sent /SmartDashboard/IMAGE_COUNT and it *almost* worked. It sent it once. but thats it. it will NOT overwrite the values. it will create them and send them but not overwrite using Set_Variable, i set GG = 123 i sent GG TableViewer says GG = 123 i set GG = 234 (in RoboRealm) i send GG TableViewer says GG = 123 i make a new variable GG1 i set GG1 = 234 i send GG1 TableViewer says GG1 = 234, GG = 123 |
|
#13
|
||||
|
||||
|
Re: Using Network Tables
bump
|
|
#14
|
||||
|
||||
|
Re: Using Network Tables
ok it seemed to work by installing the mid-season update but now it refuses to send arrays!
i can send whatever values i want but I put in the blob filter and tried to send BFR_COORDINATES and nothing was sent. i can swap it out for something like IMAGE_WIDTH or IMAGE_COUNT and it sends just fine but just nothing sends when i send BFR_COORDINATES on the other hand, how do you send arrays via NetworkTable anyway... |
|
#15
|
|||
|
|||
|
Re: Using Network Tables
If you have trouble sending arrays you can always use the Set_Variable module and set something like
/SmartDashboard/coord1x to BFR_COORDINATES:0 i.e. 0 is the first value of the BFR_COORDINATES. Likewise BFR_COORDINATES:1 would be the second (coord1y) and so on. Assuming you only want to send the first 4 coordinates this is a possible way to itemize each of the array values and send them individually. STeven. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|