WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-11-2018, 10:40 AM
Vaquero Vaquero is offline
Member
 
Join Date: Nov 2015
Posts: 62
Smile figured it out

I went at it again today and figured it out. For now, I added a few lines of code to the file that vizconnect saves. In the initTrackers() function, add these lines of code, if you want to track the extra HTC Vive trackers that are not controllers in vizconnect:

Code:
	#VC: initialize a new tracker
	_name = 'extra_tracker_1'
	if vizconnect.isPendingInit('tracker', _name, initFlag, initList):
		#VC: init the raw object
		if initFlag&vizconnect.INIT_RAW:
			#VC: set some parameters
			index = 0

			#VC: create the raw object
			import steamvr
			try:
				tracker = steamvr.getTrackerList()[index]
			except IndexError:
				viz.logWarn("** WARNING: Not able to connect to tracker at index {0}. It's likely that not enough trackers are connected.".format(index))
				tracker = viz.addGroup()
				tracker.invalidTracker = True
			rawTracker[_name] = tracker

		#VC: init the wrapper (DO NOT EDIT)
		if initFlag&vizconnect.INIT_WRAPPERS:
			vizconnect.addTracker(rawTracker[_name], _name, make='Valve', model='SteamVR Controller Tracker')
You can, of course, change the name. Add this snippet again with another name and index to add additional trackers.
Reply With Quote
Reply

Tags
full body, htc vive, inverse kinematics, tracking

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:33 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC