WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-12-2009, 09:36 PM
VDong VDong is offline
Member
 
Join Date: Sep 2008
Posts: 7
Coordinate Transforms: Vizard to Haptic

Hello,

In a haptic demo (using the SensAble Omni + Vizard 3.1, if that makes any difference), I'm trying to set the location of a node3d object (a pen) to a specific location on-screen before I set it as the marker.

To do this, I have a bit of alignment code which allows me to continually adjust the pen's position (using pen.translate(...) until it's where I want it to be; then I set hd.translate(pen.getPosition()), and hd.marker(pen). The reason I do the alignment first, then set the marker is because as far as I know, once the haptic device's marker has been set, there's no way to alter its position (independent of the haptic device's movement).

However, Vizard and hd do not appear to use the same coordinate systems, or there is some sort of weird transformation going on when I set hd.translate, because printing the pen's position and hd.get(hd.POSITION) give me significantly different values right after I set hd.translate to pen.getPosition()!

I don't know precisely how hd.translate relates to the position of the marker, so that could be the problem. I'm not attached to this method, either - basically, all I need is for the marker to appear/start from a specific reference point as seen in-world/on-screen as opposed to its default starting point in front of the user.

Thanks,
Jeff

P.S. Along with setting the marker's translation, its rotation also needs to be set, but the code we have for that appears to be working via the method outlined above.
Reply With Quote
  #2  
Old 05-14-2009, 07:46 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,465
When you use hd.get(hd.POSITION) the value you are returned is not in Vizard's coordinate system. When you scale the haptic space you define the boundaries and set values to them and the position follows from that. The position is not given in meters, there are no units, its relative to the values of the boundaries.
Reply With Quote
Reply

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Vizard tech tip: Using the Python Imaging Library (PIL) Jeff Vizard 0 03-23-2009 11:13 AM
Vizard tech tip: Text to Speech Jeff Vizard 1 01-15-2009 09:39 PM
Different coordinate system for plug-in and vizard API? reedev Plug-in development 4 12-10-2008 08:43 AM
Vizard and Augmented Reality realvision Vizard 4 04-04-2008 10:59 AM
Vizard won't run wouters Vizard 5 02-05-2008 11:12 AM


All times are GMT -7. The time now is 08:10 AM.


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