# vrpn.cfg.SAMPLE for VRPN version 05.03 ################################################################################ ################################################################################ # This file provides comments and examples for the vrpn.cfg file that is read # by the vrpn_server application when it starts up. This is a generic server # application that can start up many but not all servers (not the Phantom # server, for example). # # This has sample lines for a vrpn.cfg file. If you get a new device working, # add a line for it here. DO NOT remove lines from this file (unless # devices are declared obsolete) - just change the actual vrpn.cfg to match # your application. # # All examples in the file are preceeded by comment characters (#). To actually # use one of these examples, remove that character from the beginning of all the # examples that you want to use, and edit those lines to suit your environment. ################################################################################ ################################################################################ ################################################################################ # Tracker classes. Lines here to start various tracker servers. A description is # provided for each type of tracker for the arguments it takes, then an example # configuration line is provided. ################################################################################ ################################################################################ # NULL Tracker. This is a "device" that reports the Identity transformation for # each of its sensors at the specified rate. It can be used to verify connections # are working and for other tests of VRPN. There are three arguments: # char name_of_this_device[] # int number_of_sensors # float rate_at_which_to_report_updates #vrpn_Tracker_NULL Tracker0 2 2.0 ################################################################################ # Flock-of-birds Tracker. Runs an Ascension Flock of Birds tracker that is # attached to a serial port on this machine. Note that there is another driver # (listed below) that runs the Flock when each sensor is connected to its own # serial line. Arguments: # char name_of_this_device[] # int number_of_sensors # char name_of_serial_device[] # int baud_rate_of_serial_device #vrpn_Tracker_Flock Tracker0 4 /dev/ttyS0 115200 ################################################################################ # Flock-of-birds in parallel Tracker. Runs an Ascension Flock of Birds tracker # that has its source and each sensor plugged into its own serial port on this # machine (perhaps through a Cyclades multi-port serial card). This mode of # operation increases the throughput and decreases the latency of tracker reports. # The arguments match those of the Flock-of-birds tracker from above, with the # addition of the name of the serial ports for each of the sensors added at the # end. Arguments (all on the same line): # char name_of_this_device[] # int number_of_sensors # char name_of_serial_device_for_controller[] # int baud_rate_of_serial_device # [one for each sensor] char name_of_serial_device_for_sensor[] #vrpn_Tracker_Flock_Parallel Tracker0 4 /dev/ttyC4 115200 /dev/ttyC0 /dev/ttyC1 /dev/ttyC2 /dev/ttyC3 ################################################################################ # Fastrak Tracker. Runs a Polhemus Fastrak tracker that is attached to a serial # port on this machine. This driver will also run an InterSense IS600 or IS900 # tracker, but you will want to include extra initialization code (as described # below) to set up the ultrasonic pip information, wand devices, stylus devices # and so forth. Arguments that go on the first line: # char name_of_this_device[] # char name_of_serial_device[] # int baud_rate_of_serial_device # # It is possible to add additional commands that will be sent to the tracker # by putting the backslash character (\) at the end of the config line. This # will cause the following line to be read in and sent to the Fastrak during # the reset routine. You can add additional lines by putting a slash at the # end of each command line but the last. Each line will be sent to the Fastrak # with a newline at the end of it. If a line starts with an asterisk (*), then # it is treated as a line telling how long to sleep, with the integer number of # seconds following the *. # # Commands to add Joysticks (2 buttons) or Wands (5 buttons and 2 analogs) to # the various sensors on the Isense900 are done by adding Stylus and # Wand command lines before the reset command lines. Each of these lines # takes two arguments: the name of the button (for Stylus) or button and # analog (for Wand) servers, and the sensor number (starting from 0). The # Wand line takes eight additional parameters, which specify the scaling # and clipping behavior of the two directions on the analog joystick. Each # set of for is the min, lowzero, hizero, and max values: these are mapped # to -1, 0,0, and 1 (all values between lowzero and hizero are mapped to 0). # Start with these at -1,0,0,1 and use the 'printcereal' program or some other # method to read them and see what the range of acheivable values is. Then, # set them to slightly conservative values so that the whole range is covered # and the analogs will report zero when the joystick is centered. The # presence of these lines is indicated by placing them after any additional # reset command lines, by ending the line preceding them with the front slash # "/" character. # # Note that this frontslash and backslash-notation can only be used for the # Fastrak/Isense tracker, not to extend the line for any other type of device # listed in this configuration file. #vrpn_Tracker_Fastrak Fastrak0 /dev/ttyS0 19200 # IS600 and its pip settings #vrpn_Tracker_Fastrak Isense600 /dev/ttyS0 19200 \ #MCc\ #*5\ #MCM1,1,0.0900,0.0000,-0.2210,0.00,0.00,-1.00,89\ #MCM1,2,-0.0566,0.0000,-0.2210,0.00,0.00,-1.00,87\ #MCM2,1,0.0900,0.0000,-0.2210,0.00,0.00,-1.00,66\ #MCM2,2,-0.0566,0.0000,-0.2210,0.00,0.00,-1.00,71\ #MCM3,1,0.1237,-0.0762,-0.0424,0.00,0.00,-1.00,82\ #MCM3,2,0.1237,0.0762,-0.0424,0.00,0.00,-1.00,77\ #MCe\ #*10 # IS900 with a wand on the first sensor and a stylus on the third: #vrpn_Tracker_Fastrak Isense900 COM1 115200 / #Wand Wand0 0 -1.0 0.0 0.0 1.0 -1.0 0.0 0.0 1.0 / #Stylus Stylus0 2 ################################################################################ # Dynasight Tracker. Runs an Origin System's DynaSight tracker connected to a # serial port on this machine. arguments: # char name_of_this_device[] # int number_of_sensors # char name_of_serial_device[] # int baud_rate_of_serial_device #vrpn_Tracker_Dyna Tracker0 1 /dev/ttyS0 19200 #vrpn_Tracker_Dyna Tracker0 1 COM1 19200 ################################################################################ # AnalogFly Tracker. This is a tracker that is intended to be used on top of # a joystick or motion tracker of some kind to turn it into a moving or flying # device. It could be used on top of any analog device, in fact. # This device basically takes in analog signals and puts out transformation # matrices. It should supercede the JoyFly tracker, since it is more general. # There are two kinds of JoyFly's: absolute ones and differential ones. For # absolute ones, the analog value is mapped directly to position or orientation # on each axis. For differential ones, the values are used to create a # "change" matrix that is applied once per interval, accumulating changes as # it goes; this allows the user to "fly" along by holding a joystick forward, # for example. # One analog channel is associated with each axis (X, Y, Z) and rotation about # each axis (RX, RY, RZ). For each axis, the value is converted to a position # (meters) or speed (meters/second) for absolute trackers; or int an orientation # (revolutions) or angular velocity (revolutions/second) by first subtracting # an offset, then thresholding it to see if it is far enough from zero, then # (if it is) scaling it and taking it to a power (to allow nonlinear speedup # as the stick is pushed far from center). # A button can be associated with a reset function, which will take the # device back to center (identity transformation). The device will also recenter # when the first connection is made to the server it is running on. (Centering # has no effect on absolute JoyFlys). # Any axis or the reset button can be disabled by setting the name of its # associated device to the string "NULL". # Note that you could have multiple of these devices running simultaneously, # each with a different name and interaction metaphor. The user could then # connect to their favorite one. Arguments: # char name_of_this_device[] # float update_rate_to_send_tracker_reports # char "absolute" or "differential" # [six lines follow, one for X Y Z RX RY RZ, each with: # char axis_name[] (X Y Z RX RY RZ in that order) # char name_of_analog_device[] (start with * for local) # int channel_of_analog_device # float offset # float threshold # float scale # float power # ] # [New line to describe reset button, with: # char "RESET" # char name_of_button_device[] (start with * for local) # int which_button_to_use # ] #vrpn_Tracker_AnalogFly Tracker0 60.0 relative #X *CerealBox0 4 0.0 0.021 1.0 1.0 #Y *CerealBox0 5 0.0 0.021 1.0 1.0 #Z *CerealBox0 6 0.0 0.021 3.0 1.0 #RX *CerealBox0 0 0.0 0.021 1.0 1.0 #RY *CerealBox0 1 0.0 0.021 1.0 1.0 #RZ *CerealBox0 2 0.0 0.021 3.0 1.0 #RESET *CerealBox 3 #vrpn_Tracker_AnalogFly Tracker0 60.0 absolute #X NULL 0 0.0 0.0 1.0 1.0 #Y NULL 0 0.0 0.0 1.0 1.0 #Z NULL 0 0.0 0.0 1.0 1.0 #RX *Radamec0 1 0.0 0.0 -0.0027777777 1.0 #RY NULL 0 0.0 0.0 1.0 1.0 #RZ *Radamec0 0 0.0 0.0 0.0027777777 1.0 #RESET NULL 0 ################################################################################ # XXX This device is superceded by the more-general vrpn_Tracker_AnalogFly # JoyFly Tracker. A vrpn_Tracker that translates the vrpn_Joystick into # Walkthrough- convention tracker reports. This is part of a two-part setup # that allows you to use a joystick as a flying device. First, a joystick # device has to be created (named joybox in our example) that will produce # the analog inputs that the JoyFly tracker uses to determine the transformation. # Then, the JoyFly device needs to be started and will listen to the device # and produce tracker reports. If these are both run on the same server, then # the JoyFly needs to use the "server" connection to hear from the Joystick # device, which is indicated by placing a '*' in front of the name of the # joystick device that it is to use. If the joystick device is remote from # this server, then the full name of it should be used (joystick@foo.cs.unc.edu). # XXX This device is superceded by the more-general vrpn_Tracker_AnalogFly # Arguments: # char name_of_this_device[] # char source_joystick_name[] (Begin with * for one sharing your connection) # char joystick_configuration_file_name[] #vrpn_JoyFly walk-joybox *joybox vrpn_Joyfly.cfg ################################################################################ # 3Space Tracker. Runs a Polhemus 3Space (not Fastrak) tracker that is attached # to a serial port on this machine. Note that as of VRPN 04.07 there is some sort # of bug in the 3Space orientation decoding; nobody has had enough need for this # to fix it yet. Arguments: # char name_of_this_device[] # char name_of_serial_device[] # int baud_rate_of_serial_device #vrpn_Tracker_3Space Tracker0 /dev/ttyS0 19200 ################################################################################ ################################################################################ # Non-tracker devices. Lines are provided here for the various non-tracker servers # that can be started. ################################################################################ # Example Dial server. This is a "device" that reports constant rotations for # each of its dials at the specified rate. It can be used to verify connections # are working and for other tests of VRPN. There are four arguments: # char name_of_this_device[] # int number_of_dials # float rate_at_which_the_dials_spin (revolutions/second) # float rate_at_which_to_report_updates (udpates/second) #vrpn_Dial_Example Dial0 2 2.0 10.0 ################################################################################ # CerealBox dial/button/analog. Runs a BG Systems CerealBox device that attaches # to a serial port on this machine. As of VRPN version 04.07, 19200 is the # only supported baud rate. The driver has been tested on an LV824-F-8e device. # Arguments: # char name_of_this_device[] # char name_of_serial_device[] # int baud_rate_of_serial_device # int number_of_buttons_to_read (starting from 0) # int number_of_analogs_to_read # int number_of_encoders_to_read #vrpn_CerealBox Cereal0 /dev/cua0 19200 8 8 8 ################################################################################ # Magellan button/analog. Runs a Logitech Magellan device that attaches # to a serial port on this machine. As of VRPN version 04.12, 9600 is the # only supported baud rate. # # Note that if you want to use the Magellan as a tracking device, you will # need to run a vrpn_Tracker_AnalogFly device that listens to its analog # outputs and converts them into tracker reports # # Arguments: # char name_of_this_device[] # char name_of_serial_device[] # int baud_rate_of_serial_device #vrpn_Magellan Magellan0 /dev/cua0 9600 ################################################################################ # NRL Immersion Box dial/button/analog. Runs a Immersion Interface Box device # attached to a serial port. As of March 28, 2000 code to read the analog and # angle encoders has not been implemented. Also, baud rate on many SGI's is # limited to 38400, but I have run the ibox at 115200 on PCs. # char name_of_this_device[] # char name_of_serial_device[] # int baud_rate_of_serial_device # int number_of_buttons_to_read (i.e. 4 ==> 0,1,2,3) # int number_of_analogs_to_read # int number_of_encoders_to_read #vrpn_ImmersionBox ibox /dev/ttyd2 38400 4 0 0 #vrpn_ImmersionBox ibox com1 115200 4 0 0 ################################################################################ # Wands button/analog, driver from Brown University. Runs a Wanda device # attached to a serial port. As of Aug 28, 2000 this driver was untested on # Windows machines. The code compiles fine for them, so it seems like things # should work okay... # # Arguments: # char name_of_this_device[] # char name_of_serial_port_to_use[] # int baud_rate_of_serial_device # float minimum_update_rate #vrpn_Wanda wanda /dev/ttyd2 38400 60.0 ################################################################################ # Radamec Serial Position Interface analog. Camera tracker that attaches # to a serial port on this machine. Note that for normal operation, 38400 is the # only supported baud rate. # # Note that if you want to use the Radamec SPI as a tracking device, you will # need to run a vrpn_Tracker_AnalogFly device (of the absolute variety) # that listens to its analog outputs and converts them into tracker reports. # # Arguments: # char name_of_this_device[] # char name_of_serial_port[] # int baud_rate_of_serial_port #vrpn_Radamec_SPI Analog0 /dev/ttyS16 38400 ################################################################################ # SGI Dial and Button box, raw interface. Runs a dial-and-button box from SGI, # talking to it through the raw serial interface (not using the GL interface # supplied by SGI). This allows the box to be opened even if there is nobody # logged on at the console. Note that to use this on an SGI, you will need to # configure the port as a serial device, not as a button device, to get it to # run. Arguments: # char name_of_this_device[] # char name_of_serial_device[] # [list of buttons to treat as toggles] int button_to_toggle #vrpn_raw_SGIBox Sgibox0 /dev/ttyS0 0 1 2 3 ################################################################################ # SGI Dial and Button box, cooked interface. Runs a dial-and-button box from SGI, # talking to it through the GL interface supplied by SGI. Note that this can # only be used on an SGI, and the serial port must be configured as a dial/button # device and the dial/button server from SGI must be running to use it. Arguments: # char name_of_this_device[] # [list of buttons to treat as toggles] int button_to_toggle #vrpn_SGIBOX Sgibox0 1 2 ################################################################################ # UNC Python button device. UNC has developed a custom button input device, which # is a 5-button controller that attaches to a parallel port and uses the sense # lines to return the state of the buttons. This runs the device. Note that on # Windows NT, you need to have installed the GiveIO driver for this code to # work. It also works on Linux (no extra drivers needed), but on no other # architecture. Arguments: # char name_of_this_device[] # int parallel_port_to_use_starting_with_1 #vrpn_Button_Python Button0 1 ################################################################################ # UNC Joystick driver. UNC has developed a custom-build joybox, with 7 analog # and 2 button inputs (two 3-axis joysticks and a slider, with a button on top # of each joystick). This will drive one of these devices, which attaches to # a serial port on this computer. I'm not sure what the baud rate should be; # David Harrison might know. # This driver can be used in conjunction with the JoyFly driver to produce a # tracker that uses the joystick to fly around. Arguments: # char name_of_this_device[] # char name_of_serial_device[] # int baud_rate_of_serial_device # float minimum_update_rate_from_analogs_even_if_they_dont_move #vrpn_Joystick Joybox0 /dev/ttyd1 19200 10.0 ################################################################################ # Fakespace Pinch Glove. Drives a Fakespace Pinch Glove device connected to a # serial port on this machine. This device has ten buttons-two hands and five # fingers on each hand. Buttons 0-4 are fingers for the right hand-thumb first # and pinkie last- while buttons 5-9 are for the left hand-thumb first. The # Button is ON when it is touching another finger. Therefore there cannot # be just one Button ON. Arguments: # char name_of_this_device[] # char name_of_serial_device[] # int baud_rate_of_serial_device # vrpn_Button_PinchGlove PinchGlove0 COM1 9600