![]() |
Camera Trouble
We need help figuring out what this error means and how to fix it:
Code:
Error when getting image from the camera: IMAQdxError: -1074360306: No acquisition in progress. at edu.wpi.first.wpilibj.CameraServer.capture(CameraServer.java:222) |
Re: Camera Trouble
Can we see your code? It is very difficult to debug code without seeing it.
What camera are you using? |
Re: Camera Trouble
CameraServer server;
public void robotInit() { oi = new OI(); dt= new DriveTrain(); am = new ArmMovements(); server = CameraServer.getInstance(); server.setQuality(50); server.startAutomaticCapture("cam0"); |
Re: Camera Trouble
Quote:
Is this the only place that you are accessing the camera? Are there any other errors? |
Re: Camera Trouble
No
Yes No |
Re: Camera Trouble
Quote:
|
Re: Camera Trouble
Do you know that it is named cam0? You can check by logging into the rio's maintenance page and see what name it lists for the camera. We've had issues with cameras not being named as expected. Wrap all your camera code in try..catch blocks so camera errors don't bring down your whole program.
|
Re: Camera Trouble
Have you tried imaqdxStartAcquisition()?
|
Re: Camera Trouble
I second Ninjastahr 's suggestion. I was having an issue with a Genius webcam and switched from the CameraServer class to NIVision. (thanks, jojoguy10!). Check out the "Intermediate Vision" example.
|
Re: Camera Trouble
Just from reading the error
"No Acquisition in progress" sounds like you either aren't telling your camera to capture in the code, or you are having a physical problem on your camera preventing it from capturing images |
Re: Camera Trouble
A few questions:
Is this on the FMS or your own connection(e.g. Practice router or tether)? What camera are you running? I'm not a programmer nor a professional, just an electrical/control systems troubleshooter. My team had a similar issue, however I can't think of the error off the top of my head. |
| All times are GMT -5. The time now is 01:04. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi