Go to Post If said device costs 10x more to manufacture than a simpler solution integrating COTS parts, and only performs 10% better, that's poor engineering. - Cory [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-02-2010, 13:37
taysonholzer taysonholzer is offline
Registered User
FRC #2484
 
Join Date: Feb 2010
Location: Bountiful, Utah
Posts: 4
taysonholzer is an unknown quantity at this point
Camera Image Delay

We're experiencing a four second delay from our Axis camera to the Classmate PC. Is this a programming problem or is this just inherent to the operation of the camera? If it is a programming problem, how do we fix it in Windriver?
Reply With Quote
  #2   Spotlight this post!  
Unread 16-02-2010, 00:28
buddyb's Avatar
buddyb buddyb is offline
Registered User
FRC #1885 (ILITE)
Team Role: Programmer
 
Join Date: Dec 2009
Rookie Year: 2008
Location: Haymarket, VA
Posts: 65
buddyb has a spectacular aura aboutbuddyb has a spectacular aura aboutbuddyb has a spectacular aura about
Re: Camera Image Delay

Four seconds? That's *really* significant.

In your teleoperated loop, try placing a "Wait(0.05); //(50 ms)". It has an unnoticeable effect on the teleoperated mode, but allows other tasks to run EXTREMELY smoothly, which may greatly help image transfer. It can also make your program far more responsive.
__________________
FRC - Team 1885 - Programmer.
Reply With Quote
  #3   Spotlight this post!  
Unread 16-02-2010, 09:29
Mike Mahar Mike Mahar is offline
Registered User
FRC #0138
 
Join Date: Jan 2007
Location: Amherst, NH
Posts: 64
Mike Mahar will become famous soon enough
Re: Camera Image Delay

If you install the new Mandatory DriverStation update, this should improve to about a 1/2 second delay. There was a modified Dashboard that was posted last week that removes several CPU hog functions from the Dashboard. We are using that Dashboard and there is almost no noticeable delay in the camera. You have to use the latest DriverStation but you can use any Dashboard.
Reply With Quote
  #4   Spotlight this post!  
Unread 17-02-2010, 06:49
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Camera Image Delay

From my investigations, the large four or five second lag was typically caused by the laptop not keeping up with the cRIO pushing out images. Some of this overhead was due to some UI stuff in the DS itself related to the cypress I/O. The latest update cuts down the CPU resources needed by the DS, so the issue will likely go away. If it doesn't, run in Developer and look at the task manager to determine if there are other tasks which are contributing. As for comparing different dashboards, I haven't directly compared different ones for performance. If anyone has quantitative comparison, I'm all ears.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 17-02-2010, 08:54
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Re: Camera Image Delay

If you just want video and don't care about the rest of the dashboard for now, TheDominis has made a lightweight video dashboard. Read about it here:

http://www.chiefdelphi.com/forums/sh...ad.php?t=82422

I'm also making custom dashboard software that will support video in C++ with hardware rendering for maximum speed, but it's not out yet. You can read about it here:

http://www.chiefdelphi.com/forums/sh...ad.php?t=80561

Another thing you can do is get a USB to Ethernet connector and run the dashboard on a faster laptop.
__________________
Reply With Quote
  #6   Spotlight this post!  
Unread 18-02-2010, 07:27
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,748
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Camera Image Delay

I certainly don't want to discourage anyone from making a dashboard framework. As long as your are learning and enjoying yourself ...

But until you've measured the speed of the IMAQ display, perhaps throwing around terms like HW accelerated or super-fast is a bit premature. The IMAQ stuff is used in industry and is quite optimized. There are always new and better ways to skin a cat, but that is also why NI pays people to take advantage of such things.

If you have some comparisons worth sharing, I'm always game. I know just who to show it to in order to get IMAQ improved.

Greg McKaskle
Reply With Quote
  #7   Spotlight this post!  
Unread 18-02-2010, 10:59
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Re: Camera Image Delay

By all means, I'm not discouraging anyone from making their own system. It's a great way to challenge yourself and get something that custom-fits what you need. If anybody wants to pursue their own dashboard system, feel free to contact me if you want any help. That's what the Chief Delphi community is for.

I'm also not saying that the system I'm developing is faster than IMAQ, just that it is fast. I use the term hardware-accelerated because my dashboard can use DirectX or OpenGL as a renderer. When I do benchmarks (eventually), I'll be sure to share them.

Matt Kline
__________________
Reply With Quote
Reply


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
2010 FRC camera vision tracking delay, image processing lag pspeer C/C++ 18 18-02-2010 07:24
camera delay alex42 Sensors 1 15-01-2010 21:23
Camera image? P.Svilans Programming 1 09-03-2009 17:20
Invert camera image? mcb NI LabVIEW 2 21-02-2009 13:23


All times are GMT -5. The time now is 13:05.

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