![]() |
Problems with USB camera(Lifecam)
Hey there,
We have been experiencing problems trying to integrate the USB camera into our actual driving code. The LifeCam code disables the driving code, specifically the motor controllers, and we are not exactly sure of why. What we have been trying to troubleshoot it for the last week, without any considerable success. Any help is greatly appreciated. Code:
#include "WPILib.h" |
Re: Problems with USB camera(Lifecam)
You're declaring cam0 at the end of the list of Robot variables. Does it work if you move the cam0(0) line to the end of the initializations, after flywheel(w)?
|
Re: Problems with USB camera(Lifecam)
Alan,
We tried what you said but we still are getting the following errors
|
Re: Problems with USB camera(Lifecam)
It sounds like you might have fumbled some of the commas or semicolons when you moved the cam0(0) line. Can you post the part of the code that you modified?
I'm assuming you retyped the errors into the post by hand rather than copying them, because of the missing zero in cam(0). If you actually did copy and paste, then it seems you introduced a misspelling it when you moved it in your code. |
Re: Problems with USB camera(Lifecam)
I have double checked the comas and semicolons and nothing seems weird, but you are welcome to check if you want to.
Code:
#include "WPILib.h" |
Re: Problems with USB camera(Lifecam)
Shouldn't the USBCamera constructor called with cam0("cam0", true) ?
|
Re: Problems with USB camera(Lifecam)
Quote:
Quote:
USBCamera (std::string name, bool useJpeg) http://first.wpi.edu/FRC/roborio/rel...USBCamera.html Are you just trying to view the cam on dashboard, or are you trying vision processing? If you just want to view on dashboard, it is probably easier to just use CameraServer. http://first.wpi.edu/FRC/roborio/rel...eraServer.html |
Re: Problems with USB camera(Lifecam)
Check your CPU usage. Ours skyrocketed when we enabled the camera, no matter the resolution / fps. We had two incidents on the field when we could not drive, but other motors worked just fine. It turns out we were hovering at 110% cpu usage for all of our matches, and that somehow disabled the drivetrain. Our rudimentary solution was to use a raspberry pi with MJPG streamer to get the feed to our driverstation.
|
| All times are GMT -5. The time now is 10:26 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi