![]() |
Re: LifeCam USBCamera changing settings from Java
Just wanted to say thanks for reporting your findings on all of this. I've been busy taking care of some other mentor duties, and this is a life saver in allowing some students still get some help in trouble shooting what is going on with limited software experience
|
Re: LifeCam USBCamera changing settings from Java
Quote:
|
Re: LifeCam USBCamera changing settings from Java
Quote:
|
Re: LifeCam USBCamera changing settings from Java
I gave up trying to get image processing working on the roboRIO. I ended up having really bad problems - either GRIP or the robot code was crashing and generating a core dump (a HUGE file). This core dump was taking up all the storage space on the roboRIO which in turn would prevent the robot code from launching (you'd see exceptions that it couldn't write certain files because there was no room left on the device). I ended up moving everything to a Raspberry Pi. We now have a very stable system that works quite well and gives us all the control we need. I intended to post detailed documentation when I get a chance.
As for doing the above in C++, I did get that part of the process working in Java. C++ should be quite similar. Where is your code crashing? |
Re: LifeCam USBCamera changing settings from Java
Quote:
|
Re: LifeCam USBCamera changing settings from Java
Hello, any more updates to this post? I was reading on another post GRIP will not work with Lifecam. Were you able to get past this without using Axiscam and produce code in network tables for targeting?
|
Re: LifeCam USBCamera changing settings from Java
Quote:
|
Re: LifeCam USBCamera changing settings from Java
Thanks for the quick reply. We are using Lifecam with roborio and having trouble getting the network tables to update after publishing GRIP. Getting HSL Threshold needs a 3-channel input. When we open Outline Viewer we see the report but no coordinates. We are publishing the contour report with images and trying with webcam. Both result in no network table updates. Any feedback is appreciated.
|
Re: LifeCam USBCamera changing settings from Java
Quote:
What do you mean "publishing the contour report WITH IMAGES"? I did see that sometimes I would have to restart the Outline Viewer to get it to see the GRIP changes. Network Table weirdness. Step back and do things one step at a time. Make a GRIP pipeline that just pulls in the Lifecam, publish the video and the framerate, make sure that works. Add pieces and publish, etc. BE CAREFUL ABOUT BANDWIDTH and CPU UTILIZATION. 320x240 definitely was slow on the roboRIO. (all we did was a HSL threshold and contour) we dropped to 160x120. One problem with GRIP is that you can't get the camera to generate a smaller frame size, you have to do a resize in GRIP - this is wasteful and bad. Grip is pulling in a 720p or 640x480 image (not sure which) and they you resize in GRIP to something that you can operate on and transmit to the driver station. Resize is an expensive operation, especially if you do one of the interpolations. You can check CPU Utilization by logging into the roboRIO (from a terminal / command line) and typing: top look at the java process with GRIP. On the RPi I had the CPU pegged, GRIP was taking 2/3 processor, jpg-streamer was taking 1/3. I dropped the frame rate and frame size to get the CPU utilization down to about 80% What we tried on the roboRIO --- What I was originally doing was: HSL threshold publish frame rate right out of the source (that let me know that it was actually generating frames) contour contour filter publish contour report created a mask with original image and contours published the mask It worked fine when we would run manually and deploy robot code (basically during testing). But when I added the code to have the robot code launch GRIP, we started seeing memory issues and fairly regularly, it would crash the JVM, generating a core-dump file in the process. Core dump files are HUGE and it would eat up all the device storage space. When the robot code tried to relaunch, it would hang because it attempts to create some files (preferences for example) and it couldn't because the file system was out of space. This is a VERY bad situation - robot code won't run. When this happened, I had to manually delete the core-dump files to get robot code running again. This is why I switched to the Pi - too risky to have the robot code / JVM crash in the middle of a match. |
Re: LifeCam USBCamera changing settings from Java
BTW, make sure you have the latest version of GRIP. They're up to 1.3.1 now. We are currently using 1.2.1. I know 1.1.1 had problems
|
Re: LifeCam USBCamera changing settings from Java
Thanks again. When I said I updated Rio with images I meant the input source in GRIP was all of the Stronghold images. I tried to publish this way and then with Lifecam as source. Both gave me issues. Once we setup the hue,etc are we to publish GRIP with images or Webcam as source? As you can tell this is our first time using GRIP.
|
Re: LifeCam USBCamera changing settings from Java
Quote:
|
Re: LifeCam USBCamera changing settings from Java
Quote:
This makes me nervous... I haven't filled the filesystem, but the executable crashes with out of memory. Didn't see a core. Before GRIP, I see only 25M free, so I know its close. |
Re: LifeCam USBCamera changing settings from Java
Does anyone know how long it takes to process a pipeline? Is there a way to find out the publish rate to NetworkTables?
|
| All times are GMT -5. The time now is 02:28. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi