FAQ

Russell Taylor edited this page Apr 2, 2015 · 1 revision

How do I get started with VRPN?

See the Getting Started and Installing and testing pages. Hidden down in the middle of the index page is an "Other Resources" section. It includes a link to a paper that describes the philosophy and has simple examples for a client and server and a Powerpoint presentation given at that talk.

Included in the downloaded source code are Makefiles and Visual Studio 6.0/.NET projects that will build test applications and examples.

The standard vrpn_server project runs from a configuration file (server_src/vrpn.cfg) that includes an example that has a NULL tracker (which reports "I'm at the origin" over and over). You can connect to it with "vrpn_print_devices" to get an example of how to read from various devices in a client.

I'm having a problem: how do I troubleshoot?

See the troubleshooting page.

How do I write a server for a new device?

See the Writing a device driver page for information on how to write a driver for a new device in VRPN.

What latency does VRPN add?

Not much, and sometimes it actually reduces latency. This is described in a paper describing VRPN presented at the VRST 2001 conference.

Sometimes, VRPN is designed into the standard device drivers by the vendor. In the case of the NaturalPoint Optitrack, tests by the vendor that compared VRPN latency to their native streaming protocol found that the results were comparable (sometimes VRPN was a fraction of a millisecond earlier, sometimes a fraction of a millisecond later).

Note that low latency requires calling mainloop() on the vrpn_Tracker_Remote objects right before setting the display transformations during rendering.

How do I make VRPN listen only for local connections?

Add the command-line argument "-NIC 127.0.0.1" to the vrpn_server program. You can also us this to listen on a different specific network connection if there are multiple ones on the server. If you want to have both remote and server devices on a connection that nothing else can connect to, you can use the "loopback:" name, as in "Tracker0@loopback:".

How do I keep vrpn_server from using so much of the processor?

Add the command-line argument "-millisleep 1" to the vrpn_server program.

How do I redirect VRPN messages?

The text messages page describes how to do that. The ones that are generated as text messages (like the server responses) are actually printed by the vrpn_System_TextPrinter object. You can either set the level of severity very high or else completely disable it or redirect it to a file. To use your own logging class rather than a file... that's something we didn't plan for in the design. I'm happy to have the handler made virtual if that solves the problem. However, you can do this without modyfing VRPN by declaring a vrpn_Text_Receiver and giving it the same name as the object you want to receive messages from. The vrpn_Text_Sender just exposes the same send processing that is used by the baseclass object, so the receiver will be able to get all text messages sent by the object. You will need to create an instance of this for every object you want to redirect.

How do I make VRPN link with the InterSense libraries?

Several of the Intersense trackers run in "Fastrak compatibility mode" and can be run using the Fastrak interface as described in the comments of the vrpn.cfg file in server_src. It is also possible to link and run using the InterSense-supplied control library. This has been tested on Windows with version 3.45 of the InterSense library.

The first step is to download the Intersense library into a folder called 'isense' that should be placed in the same directory as 'vrpn'; they should be sister folders. Then, uncomment the definition of VRPN_INCLUDE_INTERSENSE in vrpn_Configurtation.h and build the server. When the program runs, the isense.dll file must either be in the Windows system32 folder or else be in the directory where the server runs.

What is the difference between the vrpn project and the vrpndll project; when would I want to use the DLL version?

The DLL version is intended for those who want to link to and run VRPN from languages other than C++. VRPN itself is pretty small, so that static linkage is normally what you want. If you don't have a reason to change it, don't change it.

Why doesn't the VRPN server run when compiled with shared libraries?

The DLL file needs to be copied from the build directory (pc_win32/DLL/Debug or Release) into the executable directory (pc_win32/server_src/vrpn_server/Debug or Release) before it can be run.