WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   where can I download example scripts about force effects based on haptic device (https://forum.worldviz.com/showthread.php?t=5149)

Melody 08-25-2014 08:52 AM

where can I download example scripts about force effects based on haptic device
 
I have been looking for the example scripts on line for a while, but nothing was founded.
Some one in this forum mentioned to go to the download and demo section of vizard. I still could not find it.
Please tell me if anyone knows where to find it. Thanks a lot!
Mine is vizard 3.0.

Kevin Chiu 08-26-2014 12:18 PM

Hi,

Sorry for that the old demo which you are looking for aren't available on our web page anymore.
Can you let me know about which haptic device you have?
Thanks.

Best,
Kevin

Melody 08-27-2014 11:27 AM

Thanks for replying!
My haptic device is phantom omni from sensable.

Kevin Chiu 08-27-2014 12:26 PM

1 Attachment(s)
Here you go.
In your case please ignore the hd.dlm and hd.py, just need to use the scrips in the Examples folder.

Best,
Kevin

Melody 08-27-2014 01:07 PM

Thanks a lot!

Melody 08-27-2014 02:10 PM

Hey Kevin,

Do you have the exact version for vizard 3.0. I still could not do it. No hd. command could be found in 3.0.

Here is a snippet of my script(does not work):

effectce=device.addConstantEffect(magnitude=10,dir ection=[0,-1,0])
def buttondown(button):
if button == sensable.BUTTON_1:
effectce.trigger(0.1)
print test
viz.callback(sensable.BUTTON_1,buttondown)

If there is no version for 3.0, do you have examples for 4.0 or 5.0? I can upgrade my software later.

Thanks a lot,

Kevin Chiu 08-27-2014 02:31 PM

No, I have tested them all on 3.0, 4.0, 5.0 already. It should work right away.
Can you confirm that the example scripts runs with out problem and works fine first on your end?
What is the error message you got?
For me it seems there might be just something wrong in your code.
For example the parameter you passed to the callback doesn't seems legal at least.
Shouldn't it be a BUTTONDOWN_EVENT instead of passing the button directly?

Melody 08-28-2014 08:06 AM

Yea. I realized the mistake. I will try again.
So you mean I can still use hd.XX in vizard 3.0?
Thanks!

Kevin Chiu 08-28-2014 10:08 AM

Of course you can, if all the example script works for you then you should be able to have it too.
Just don't forget to import the hd module if you gonna use it.

Best,
Kevin

Melody 08-29-2014 03:15 PM

Can I have the command index start with hd.?
I have no idea how to define the initial position and orientation of the haptic device.
Thanks!


All times are GMT -7. The time now is 11:23 AM.

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