#1
|
|||
|
|||
Treadmill , Optotrak & Vizard
We are trying to run Vizard for Optotrak in which the participant walk on the treadmill. The problem is since it's on a treadmill, on Vizard it shows it as going back & forth ( not moving forward) since the coordinates are not changing ( ir: you go from (0,0,1) to (0,0,2) even if you go 10K on treadmill). Is there way to fix this issue?
|
#2
|
|||
|
|||
Use vizconnect to configure the viewpoint to move with optotrack data. Add a group tracker above the headtracker in the vizconnect scenegraph and update the group's position in the script that imports the vizconnect config file based on the treadmill speed. Take a look at all the vizconnect tutorials to get started if you're not familiar with vizconnect.
|
#3
|
|||
|
|||
Thank you for your reply. I created group tracker in the vizconnect. I'm wondering how can we read treadmill speed to update my mainview position? Are you suggesting let's say treadmill speed is 2 MPH, should I update the position based on that?
|
#4
|
|||
|
|||
I'm not sure how you would get the treadmill data in Vizard. Does the manufacturer provide a Python API? If so, you could use that to get the data into Vizard. Attached is an example that updates a group tracker every frame to move the viewpoint.
Last edited by Jeff; 02-02-2017 at 10:27 AM. |
#5
|
|||
|
|||
Hi Jeff,
what is unit for scale in vizard? m/s? |
#6
|
|||
|
|||
Can you describe further the code you are referring to that's scaling the movement?
|
#7
|
|||
|
|||
You sent me the simulated treadmill .. i'm wondering what's the unit of speed is so I can adjust with ours
TREADMILL_SPEED = .05 viz.add('sky_day.osgb') # Add ground model 20 times for i in range (20): viz.addChild('ground_grass.osgb', cache = viz.CACHE_CLONE, pos = [0,0.01,i+25]) groupTracker = vizconnect.getTracker('treadmill_node').getRaw() def updateGroup(): groupTracker.setPosition([0,0,TREADMILL_SPEED],viz.REL_LOCAL) vizact.onupdate(0,updateGroup) |
#8
|
|||
|
|||
The following code allows you to specify the speed in meters per second:
Code:
# Speed in meters per second SPEED = 1 def updateGroup(): # Get the elapsed time since the previous frame and multiply that against the speed in m/s groupTracker.setPosition([0,0,SPEED * viz.getFrameElapsed()],viz.REL_LOCAL) vizact.onupdate(0,updateGroup) |
Tags |
coordinate system, optotrak, treadmill, vizard |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Optotrak and vizard | Canucks | Vizard | 4 | 05-01-2017 10:18 PM |
Connecting Vizard and NDI Optotrak | vserchi | Vizard | 3 | 02-06-2015 01:04 AM |
Vizard 4 Beta Testing | farshizzo | Announcements | 0 | 02-01-2011 10:46 AM |
Vizard 4 Beta Testing | farshizzo | Vizard | 0 | 02-01-2011 10:46 AM |
Vizard tech tip: Using the Python Imaging Library (PIL) | Jeff | Vizard | 0 | 03-23-2009 11:13 AM |