View Single Post
  #5   Spotlight this post!  
Unread 03-04-2015, 20:08
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,751
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: IP Camera use in robotics

I generally see a delay of at least 60ms, but it can be more. Four seconds is basically broken.

The delay can come from a number of places, so it is hard to give a single solution to the problem, but it can be fixed.

Things that can affect camera performance/latency:
Lighting -- low light will often cause the camera to extend the exposure, possibly changing camera frame rate from what you asked it to be.

Fast producer/slow consumer -- the camera pumps N frames into the stream and the client consumes M. When N is bigger than M, the latency grows very quickly. When equal, small delays can accumulate latency.

Network buffering -- in any driver, switch, or router. This would show up in the DS log because the traffic follows the same path and is treated the same.

I generally measure this by making a counter display that updates quickly and displays a ms counter. In LV, this is an indicator that displays i inside of a loop that sleeps for 1ms. You then point the camera at the display and display that next to the original. So adjacent to each other on the screen is the true counter display and a camera display of the counter. They are both flickering away. Then take a screenshot and you'll see that the camera display lags the counter by some amount. You can do this a few times if you want to average for a more precise lag measurement.

It has been a few years since I've made accurate measurements, and for this year, I just did the snap test. Snap your fingers or make some other hand transition such as finger-counting at a fixed rate. Modify it until you can estimate the lag.

Greg McKaskle