WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 05-31-2016, 05:00 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
It does not look like there is a velocity command. The available commands can be found in the Sensable and standard sensor pages in the Vizard help. You could calculate the velocity between frames or some other time interval. For example:

Code:
import viz
import vizact
import vizmat

viz.go()
viz.addChild('piazza.osgb')
device = sensable.addHapticDevice()

lastPos = [0,0,0]
def calculateVelocity():
	global lastPos
	pos = device.getPosition()
	distance = vizmat.Distance(lastPos,pos)
	velocity = distance/viz.elapsed()
	lastPos = pos
	
vizact.ontimer(0.1,calculateVelocity)
Reply With Quote
 

Tags
omni, velocity


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Information associated with a model roobert Vizard 7 08-01-2014 09:34 AM
MainView velocity depending on joystick deflection 4711 Vizard 3 01-17-2014 12:50 PM
velocity shader subbu Vizard 0 11-24-2013 06:56 AM
how to remove velocity when mouse is disabled? jvacare1 Vizard 2 02-18-2010 10:25 AM
How Can I use two SensAble Omni at the same time junghungchien Vizard 0 09-03-2009 07:04 AM


All times are GMT -7. The time now is 06:56 AM.


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