How large are Rigid Body tracking latencies?

hpcv
Posts: 58
Joined: Tue Oct 23, 2007 2:09 pm

How large are Rigid Body tracking latencies?

Post by hpcv »

Hi,

I noticed that there is a slight lag when tracking a rigid body. Whipping up a simple C++ program, and using a marked "hammer" to hit the space bar, I managed to measure the lag with some accuracy; it is around 100 ms. This is the time from the action in the physical world to the arrival in the VRPN callback, assuming that the delay of the space bar key press is negligible.

Beta 11 of the Rigid Body tool and my measuring program ran on the same machine, a Pentium 4 at 2.4 GHz. There are four V100 cameras connected to a single hub. I tracked an object consisting of 3 markers. No other markers were in view at the time.

As we intend to use the system for head tracking in stereo rendering (currently on a passive stereo backprojection screen, later in a CAVE), it is important that the delay is minimal. I will have to write some prediction algorithm anyway, because there will also be a lag in rendering, so I'm asking this just out of curiosity.

My questions are basically, is this normal? What kinds of delays are you (other users, and the NaturalPoint folks) experiencing? What would be the best way to reduce the latency?
Jim
Posts: 1395
Joined: Mon Oct 14, 2002 5:00 am
Location: Corvallis, Oregon
Contact:

Re: How large are Rigid Body tracking latencies?

Post by Jim »

Hello:

This is an excellent question, and thanks for taking the time to measure the latency in Beta Build 11.

We are aware of excessive latency in previous beta builds. We have implemented a new camera sync routine to lower this latency substantially in the final build, due out this week. We expect it to be between 10-20ms from the camera to updated position information being available from our software, although VRPN could add some extra latency in the rebroadcast of the data. It will be fun to see what you measure again with the new build!

For reference, I would recommend using our qualified USB D-Link hubs and active extension cables, as we know they have good latency and don't cause problems. Not all USB hubs are the same, as we have found out.

The PC you are using is okay processing power wise, but we would consider it to be slow for more than 4 cameras. Using a Dual Core machine will improve performace a lot, as the code is optimized for dual processors.

Your application is what we envision to be a perfect fit for our cameras and tracking tools, so we will do what is needed to make it perform like you think it should.

Thanks for sticking with the development during the testing process.
Jim
Posts: 1395
Joined: Mon Oct 14, 2002 5:00 am
Location: Corvallis, Oregon
Contact:

Re: How large are Rigid Body tracking latencies?

Post by Jim »

Another thought on this: Build 11 does have some latency fixes in it, so it should be better than 100ms.

If each frame is 10ms at 100FPS, then the processing of one frame must be done before the next comes in, of course, so that is a max delay of 20ms to get the processed data out. I wonder if there is a way to detect the delay in parts, closer to the output and not through VRPN? Beta 11 should be at 20ms or less now for processing and output.
beckdo
Posts: 520
Joined: Tue Jan 02, 2007 2:02 pm

Re: How large are Rigid Body tracking latencies?

Post by beckdo »

As of version 1.1.032 beta 03, we've moved another key portion of the synchronization algorithm to hardware. This allowed us to drastically reduce the latency. With the latest rigid body tool and the latest OptiTrack SDK installed, I would like you to give us some feedback using your measured latency test.
hpcv
Posts: 58
Joined: Tue Oct 23, 2007 2:09 pm

Re: How large are Rigid Body tracking latencies?

Post by hpcv »

Latency still "feels" like 100 ms, at least. The Rigid Body Tool is constantly using 100% of the CPU. Also, if I make an export of tracker data (CSV format), rigid bodies are only detected in half to one third of the frames; the rest just shows the separate markers only:
frame,frame_number,0,marker_count,...

Does this mean that the machine is too slow? What kind of hardware would you recommend for a 6-camera setup (possibly to be expanded later to 8)?
VincentG
Posts: 7728
Joined: Mon Jul 17, 2006 5:00 am
Location: Corvallis, Oregon

Re: How large are Rigid Body tracking latencies?

Post by VincentG »

Which version of the OptiTrack SDK, and Tracking toolkits are you using?

What type of system are you currently using?
hpcv
Posts: 58
Joined: Tue Oct 23, 2007 2:09 pm

Re: How large are Rigid Body tracking latencies?

Post by hpcv »

For system specs, see the start post.

Tough question about the versions... I don't have the installers anymore, the "about" screens do not tell me the programs' versions, the metadata in the .exe is all zeros. Perhaps something to address in a future version?

Although, from the top of my mind, I'm quite sure that I have 1.0.033 of the Tracking toolkit. As to the SDK, I might be on the first official release -- that is, 1.1.033 without any "Final B" attached like on the download page. I do not want to upgrade this right now because I need things to be reliable for a demo next Friday. I will test with the latest version next week, but a 200% speed increase seems unlikely.
beckdo
Posts: 520
Joined: Tue Jan 02, 2007 2:02 pm

Re: How large are Rigid Body tracking latencies?

Post by beckdo »

It sounds to me like there is a video card incompatibility between what you have in your machine and what is properly supported by the .Net 3.0 Framework. It's about the only explanation for the unusually poor performance you're seeing. What video card are you running currently?
hpcv
Posts: 58
Joined: Tue Oct 23, 2007 2:09 pm

Re: How large are Rigid Body tracking latencies?

Post by hpcv »

It's a GeForce 4... not a very obscure card, I'd say, although not the most modern. More detailed system specs, that I deemed irrelevant before your previous remark:
- Windows XP SP2 fully up to date
- DirectX 9.0c
- NVIDIA GeForce4 Ti 4800 SE, 128MB
- ForceWare release 90 driver, released 2 November 2006 (shows up in DXDiag as 22 October 2006)

It is the latest driver; it seems the drivers for the GeForce 4 series are no longer maintained.

Could this card be the problem?

Edit: I deduce from your comment that the Rigid Body Tool is a .NET app? Since the Rigid Body API is complete now, I could write my own simple rigid-body-to-VRPN application in native C++ and see whether that experiences less frame drop. Or do you have a better idea?

Another edit: It seems that the sample app in RigidBody-Sample.zip does everything I want except for VRPN streaming. Should be a breeze to add that. Will try that today or tomorrow.
Birch
Posts: 1139
Joined: Thu Jan 30, 2003 5:00 am
Location: Corvallis, Oregon

Re: How large are Rigid Body tracking latencies?

Post by Birch »

The RigidBody API supports streaming VRPN. All you should need to do is add RB_StreamVRPN(true) to the sample to get that up and going. There are more details in the streaming section of the manual.
Post Reply