Difference between revisions of "CalVR Applications"

From Immersive Visualization Lab Wiki
Jump to: navigation, search
 
Line 35: Line 35:
 
<br>
 
<br>
 
<br>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.
 
<br>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.
 +
<br>
 +
<br>yoffset/xoffset - these are the offsets (in bytes) to the locations in the usb packet where the x/y movement of a mouse is being sent.  This is used for the gyromouse type tracking system and are not needed if you only want buttons.
 +
<br>
 +
<br>wheeloffset - this is the offset (in bytes) to the location in the usb packet where the mouse wheel state is stored.  This is used to turn the wheel into a valuator and is not needed if you don't want to use it.
 +
<br>wheeltimeout - there is not a new packet sent when the mouse wheel state resets.  The tracking system will clear a non zero state after this timeout if it does not see a new packet.

Latest revision as of 10:25, 13 February 2013

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.

yoffset/xoffset - these are the offsets (in bytes) to the locations in the usb packet where the x/y movement of a mouse is being sent. This is used for the gyromouse type tracking system and are not needed if you only want buttons.

wheeloffset - this is the offset (in bytes) to the location in the usb packet where the mouse wheel state is stored. This is used to turn the wheel into a valuator and is not needed if you don't want to use it.
wheeltimeout - there is not a new packet sent when the mouse wheel state resets. The tracking system will clear a non zero state after this timeout if it does not see a new packet.