Go to Post They know how to make paperweights into other objects, like robot controllers. - Greg McKaskle [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 04-05-2015, 12:13 PM
rod@3711 rod@3711 is offline
Registered User
AKA: rod nelson
FRC #3711 (Iron Mustangs)
Team Role: Mentor
 
Join Date: May 2014
Rookie Year: 2014
Location: Trout Lake, WA
Posts: 64
rod@3711 is an unknown quantity at this point
HD3000 USB Camera Blues

Finally determined that these 2 lines of code caused us a lot of pain.

CameraServer::GetInstance()->SetQuality(50);
CameraServer::GetInstance()->StartAutomaticCapture("cam0");

The USB camera seemed too easy. Small, USB cable, no separate power... With Chief Delphi forum help, added these lines and images displayed on the Standard Dashboard.

Then we moved cameras between usb ports and roborios and again with Chief Delpi help found that cam0, could become cam1, then cam2, etc.

Then found the camera could not be used by Smart Dashboard. Again Chief Delphi help we got a widget to make that work. But the behavior was so erratic, that we reverted back to the Standard Dashboard for video and kept Smart Dashboard for data display and selectors.

Even with the Standard Dashboard the image randomly overexposed. We found reducing the update rate helped, but was never solidly consistent.

During this evolution, we always had difficulty deploying and connecting to roborio. We became timid about make program changes, since the build and deploy, test sequence could take anywhere for 20 seconds to 1 hour, depending on how many times we had to reset the roborio, restart the driver station, disconnect and reconnect to the router.

Again with Chief Delphi help we were directed to the the data charts on the Standard Dashboard as well as the event logs. We were always getting a lots of Lost Packets and the CPU usage was always around 95%. We posted our usage charts on Chief Delphi, but it was at the end of a long thread, so it got no response.

Finally at the PNW regional, the tech staff spend over an hour helping us. Swapped out all hardware, reviewing our code, etc., but could not made problems go away. They had requested that we not turn on the camera "USB Camera HW" at the previous match and we seemed to connect faster, but still had issues.

Issues happened so often, our drive team called it the Ghost Problem. We needed an Exorcism.

The tech staff said the 95% cpu usage was not normal and they were used to 50% for a Command-Based, C++ program. They said since we were not using the camera, we should try removing those 2 lines of code that enabled the camera.

Wow... cpu usage 50%, connection are crisp and consistent, build and deploy in less than 20 seconds.

Our epiphany came a little late with only 3 matches left at the regional, but it was great to end an event feeling like there is hope for next season.

I would like to thank all those who helped at the PNW regional and on Chief Delphi.
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 10:45 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi