![]() |
Camera slowing down robot
Hello everyone.
I am attempting to test out the camera in Java. The default program in the cRIO had sent the camera images to the Driver station at an acceptable rate, so I was going to try the camera in java. In my main robot class, I get an instance of the AxisCamera, set it to its minimum resolution, set it to 1 frame per second, and set the compression to 30. If I do this however, the robot experiences a 3-20 second delay between teleopPeriodic calls (tested with Timer.getFPGATimestamp() and NetConsole). It also garbles NetConsole messages horribly. I am not doing any processing on the images; I am not even retrieving the image from the AxisCamera instance. Code:
camera = AxisCamera.getInstance(); |
Re: Camera slowing down robot
You may want to
1. Run ALL the camera stuff in another thread 2. Hook up the camera directly to the bridge (recommended) I personally don't how its done (we can't seem to get ours to connect), but I'm fairly certain both are possible |
Re: Camera slowing down robot
How does the robot behave when you don't run any camera initializing code? If it is still misbehaving, your issue probably lies somewhere else in your code. (look particularly close at your looped methods.)
I also highly recommend opening a new thread for anything that requires delays (or really handles anything graphical at all -- like images from a camera). |
Re: Camera slowing down robot
Code:
camera = AxisCamera.getInstance(); |
Re: Camera slowing down robot
Quote:
Quote:
Quote:
Quote:
I don't plan on making the main thread do camera work; running it in the main thread was simply to check if the camera was working. EDIT: By the bridge, do you mean the wireless router, or the cRIO? It was plugged into the cRIO board, and when I connected it to the router, it gave me "[cRIO] AxisCameraParams: connect: S_errno_EHOSTDOWN" |
Re: Camera slowing down robot
Quote:
Toy around with the settings I guess. If you get something, let me know. Our camera refuses to respond to the DS at all (both at the cRIO and at the bridge), so I'm sorry I can't help you more. |
Re: Camera slowing down robot
Quote:
Through the bridge/router/radio if you have set the camera to the same subnet you should be able to use IE (Firefox did not work for me) and go to http://10.xx.yy.90, login as FRC, FRC, and see the image. There is nothing to program or break so that will validate the camera itself is working and the IPs are all in order. |
Re: Camera slowing down robot
The laptop doesn't have LabVIEW installed, and the instillation takes way too long (It's also hampered by the fact that it doesn't have a CD drive).
Anyway, I think I figured out what was wrong with hooking up the camera to the router. The camera was not being assigned the correct IP address (fixed via a DHCP setting). The test display at 10.xx.yy.90 is working, and the robot is no longer slowing down, but there's still no display, which is probably because I haven't installed the update to the driver station. Anyway, thanks for the help everyone. :) |
Re: Camera slowing down robot
Can you please be more specific in your replies? What DHCP setting did you use? cRIO does not assign DHCP automatically so ... you should cite exactly what you did to solve the problem.
|
| All times are GMT -5. The time now is 10:51. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi