Log in

View Full Version : Camera Trouble


Team 3023
31-03-2016, 16:35
We need help figuring out what this error means and how to fix it:
Error when getting image from the camera: IMAQdxError: -1074360306: No acquisition in progress. at edu.wpi.first.wpilibj.CameraServer.capture(CameraS erver.java:222)
edu.wpi.first.wpilibj.CameraServer$2.run(CameraSer ver.java:192)
java.lang.Thread.run(Thread.java:745)
Please and thank you.

nickbrickmaster
31-03-2016, 16:43
Can we see your code? It is very difficult to debug code without seeing it.

What camera are you using?

Team 3023
31-03-2016, 16:50
CameraServer server;

public void robotInit() {

oi = new OI();
dt= new DriveTrain();
am = new ArmMovements();
server = CameraServer.getInstance();
server.setQuality(50);
server.startAutomaticCapture("cam0");

nickbrickmaster
31-03-2016, 17:01
What camera are you using?

Are you using GRIP?
Is this the only place that you are accessing the camera?
Are there any other errors?

Team 3023
31-03-2016, 17:20
No
Yes
No

CalTran
31-03-2016, 17:52
No
Yes
No

Still wondering which camera you're using? (Axis, Microsoft Lifecam, etc...)

antman
31-03-2016, 18:14
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.

Ninjastahr
01-04-2016, 13:49
Have you tried imaqdxStartAcquisition()?

Mister_E
12-04-2016, 16:52
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.

CloakAndDagger
13-04-2016, 10:39
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

Wired_Mike
13-04-2016, 15:18
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.