![]() |
USB Camera Solution
After many hours of trial and error we managed to get the USB camera to work while running the Smart Dashboard (Java). All you need to do is create a new project example for Intermediate Vision and delete lines 39, 44, & 45 (just draws a circle on the viewer of the camera). You will have some unused imports so removed those and then just make sure you have created the object in Smart Dashboard and you will be set.
|
Re: USB Camera Solution
how do i create the object for the dashboard? where do i place the line of code?
|
Re: USB Camera Solution
Quote:
|
Quote:
|
Re: USB Camera Solution
When you say USB Camera Solution, where do you plug the camera into? The NiRIO?
Also, I have tried using the smart dashboard before without any success (I rage quit), can you give us the line of code required to do this? thx. |
Quote:
|
Re: USB Camera Solution
Just figured out what you meant my the intermediate image project. thx. I'll give it a a go.
|
Re: USB Camera Solution
This seems to be working for us! We're using the command-based robot code, so it took a little bit of rejigging to use it.
We're running the image grabbing in Teleop Periodic and only every tenth call. Otherwise we had issues with not sending CAN commands to the Talons often enough. The frame rate of the camera is extremely low because of this. Anyone have any ideas on improving performance? |
Quote:
|
Re: USB Camera Solution
we just got some ms lifecam hd-3000 cameras and we're getting an exception thrown from the vision code with no camera output. i'm using the intermediate vision example with the lines indicated in a previous post deleted. the exception is:
Unhandled exception: VisionException [com.ni.vision.VisionException: IMAQdxError: -1074360311: Camera not found] at [com.ni.vision.NIVision._IMAQdxOpenCamera(Native Method), com.ni.vision.NIVision.IMAQdxOpenCamera(NIVision.j ava:24455), org.usfirst.frc.team4905.robot.Robot.robotInit(Rob ot.java:27), edu.wpi.first.wpilibj.SampleRobot.startCompetition (SampleRobot.java:121), edu.wpi.first.wpilibj.RobotBase.main(RobotBase.jav a:234)] does anyone have any suggestions for fixing this?? i'm using the latest eclipse plugin's from wpi. also i verified that the webcamera is working by plugging it into my laptop and viewing it. thanks |
Re: USB Camera Solution
Quote:
|
Re: USB Camera Solution
because the CameraServer is throwing an exception when it's trying to create the instance there is no "Cam0" or anything else. i had another webcam "sortof" working a few weeks ago, at least it did not throw this exception just a different problem when it tried to stream. i was reasonably sure the problem was no support for that camera. so we bought the "supported" webcam and now i get this exception. my guess is that the latest update to the firmware for the roborio has broken the webcam ability. unless someone else has it working on the newest wpi plugins??
|
| All times are GMT -5. The time now is 03:35. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi