CalVR Applications
Contents |
Overview
There are a few applications that can optionally be built with the CalVR core. This section describes them and how they can be configured.
CollabServer
vrpn_libusb
This is a custom vrpn server created to read button states directly from a usb device using libusb. The primary reason we created this was for use with a Gyration Gyromouse. The advantage is that it does not go through the kernel mouse driver. This allows the device clicks to not trigger desktop mouse clicks and does not require the pointer to be in the graphics window.
It can be configured to have the scroll wheel act as a simulated valuator. Also, it can read the two axis movement to provide input as a pointer type device for CalVR tiled walls.
This server uses low level access to the device, thus is does take a little bit of work to configure it properly. Also, if the devices use a more complex protocol it may not be possible to use them with this.
NOTE: this server requires write access to the usb device. You must set the permissions correctly on /dev/bus/usb/* or run as root.
Dependencies
VRPN
libusb-1.0.8 - NOTE: I have seen issues with 1.0.9
Config
Example: vrpn.cfg
numbuttons 3 vendorid 3094 productid 2 entry 0 config 0 interface 1 altsetting 0 endpoint 0 buttonoffset 1 xoffset 2 yoffset 3 wheeloffset 4 wheeltimeout 0.1
numbuttons - the number of buttons that this server will provide
vendorid/productid - This pair of numbers is used to connect to the device on the usb bus. If the specified device cannot be found, it will list all the devices connected to the system. Look through the list, find the one you wanted and use the listed ids.
entry/config/interface/altsetting/endpoint - these are parameters used by libusb to get the endpoint address to read packets from the device. I have found these numbers to work for most things. It will tell you if the values are out of range.
buttonoffset - this is the offset (in bytes) to the location in the usb packet where the button mask is stored. The button mask will have the state off all buttons with each bit representing a button (starting with least significant bit). If you do not know this value, comment out the line (#). When you run the server, the raw packet values will be output to the terminal as then arrive. Use this to determine the offset.