Skip to content

Vive Trackers

To use a Vive Tracker setup with any SightLab scene simply select either "Vive Trackers SteamVR" or "Vive Trackers CC" on the hardware configuration dropdown. The SteamVR one uses the Mark avatar, the CC one uses a Complete Character, and CC2 uses a female avatar from Complete Characters. 

In ExampleScripts ViveTrackers you can find a script that will allow you to see yourself in a mirror with different environments to verify tracking, as well as one for tracking objects in the scene and showing how to save the 6dof data from the tracker to the data files using two methods. 

Adding tracking data to data files:

import steamvr
tracker = steamvr.getTrackerList()[0]
# Adding custom data columns

for data_column in ['Tracker1 X', 'Tracker1 Y','Tracker1 Z','Tracker1 Yaw','Tracker1 Pitch','Tracker1 Roll']:
    sightlab.addCustomTrialDataColumn(data_column)

def tracker1GetPos():
  tracker1Pos = tracker.getPosition()
  tracker1Pos = [round(x, 3) for x in tracker1Pos]
  sightlab.setCustomTrialData(str(tracker1Pos[0]), 'Tracker1 X')
  sightlab.setCustomTrialData(str(tracker1Pos[1]), 'Tracker1 Y')
  sightlab.setCustomTrialData(str(tracker1Pos[2]), 'Tracker1 Z')
update_action = vizact.onupdate(0, tracker1GetPos)

 def tracker1GetOri():
  tracker1Ori = tracker.getEuler()
  tracker1Ori = [round(x, 3) for x in tracker1Ori]
  sightlab.setCustomTrialData(str(tracker1Ori[0]), 'Tracker1 Yaw')
  sightlab.setCustomTrialData(str(tracker1Ori[1]), 'Tracker1 Pitch')
  sightlab.setCustomTrialData(str(tracker1Ori[2]), 'Tracker1 Roll')
update_action = vizact.onupdate(0, tracker1GetOri)

For help in setting up the Original Vive Trackers or the Ultimate Trackers see the articles below

Swapping to Another Avatar

To choose a different avatar, it must be a Complete Character avatar. There are 4 complete characters included with SightLab:

Located in 

C:\Program Files\WorldViz\Vizard\<version>\resources\sightlab_resources\avatar\

Replace \<version> with either Vizard7 or Vizard8, depending on your installation. 

  • Complete Character/CC2_m001_hipoly_A1.cfg
  • full_body/vcc_female.cfg
  • full_body/vcc_male.cfg
  • full_body/vcc_female.cfg

(contact support@worldviz.com to see about getting the full library of Complete Character avatars).  

To change to another avatar, navigate to the vizconnects folder at C:\Program Files\WorldViz\Vizard\<version>\bin\lib\site-packages\sightlab_utils\vizconnect_configs, change user permissions to write to this folder and  and make a copy of vizconnect_config_viveTrackers_CC.py in the Vizard editor. Change line 685 to be the path to your avatar (will have to turn on permissions for editing this file). Note: you may need to change the backlashes "\" to forward slashes "/". 

You can also manually add a new avatar by making a copy of the original vizconnect, renaming it, then going to the "Advanced" - Avatars - tab, remove selected, and set up a new one according to the instructions on this page

Lastly, you will then need to add your new vizconnect file using code similar to this:

sightlab = sl.SightLabClient(vizconnectconfig = {'Custom': 'vizconnect_config_yourCustomvizconnect.py'} 

For help in setting up the Vive Ultimate Trackers see this document