HapticMaster + Vizard 4.0 SDK help
Hi everyone, I’m currently assessing Vizard in order to decide if our team should purchase a license. I have downloaded the demo copy but I have to get an external (unsupported) device working with it before we decide to purchase a copy.
The device I am using for my work is the Moog FCS HapticMaster. Basically it’s a big robot arm that interacts with a virtual world like a mouse but provides haptic feedback. I created a demo app using Ogre (graphics engine) and since that was in C++ I could easily integrate the HapticMaster to get the end effector arm xyz co-ordinates and use that to control a simple model. I understand that this device isn’t supported officially in Vizard 4.0, but I’m looking to write my own plug in. I’m having difficulty understanding some of the instructions here: http://docs.worldviz.com/vizard/VizH...ementation.htm so I thought I would ask here for some pointers. I’ll explain below how I usually interface with the HapticMaster so that it helps explain the situation better. When creating the Ogre application to use the HapticMaster end effector xyz position. All I did was include all the HapticMaster API header files and merge parts of one of the HapticMaster examples with the Ogre app. In this case sending/receiving commands to the HapticMaster (via a String command, yeah not my choosing!) and then splitting the String into the xyz values followed by assigning it to the movement of the model. So all the code is in one .cpp file calling the .h file sending command to the HapticMaster. My main problem is getting my head round doing this with the Vizard SDK. I know that I have to include the HapticMaster.h/lib files etc I have the code to get the position of the arm in C++ and have saved these as a double (xyz) but might have to put them in Vizards float. I know I have to make these values available to my .viz python code. But I can’t find any clear decent guides on how to do this within the Vizard SDK or how I would use the resulting files in a .viz file. Any help or pointers will be gladly received! Let me know if there is anything I can do to further explain etc Below is a section of the Ogre code I wrote, hope it is of some use to point me in the right direction to get started! Thanks Code:
bool TutorialApplication::processUnbufferedInput(const Ogre::FrameEvent& evt) |
It sounds like you will need to create a class that extends the "VizExtensionSensor" interface. Sensors are objects that provide position, orientation, button, and analog data. Your sensor class would just override the "getPosition" and "getOrientation" methods. You would then override the "createSensor" method of your VizExtension class to provide access to your sensor class.
Once this is implemented, the Python code for retrieving the position of the haptic device would look something like this: Code:
# Load HapticMaster extension |
Many thanks for the reply, your post does clear up alot!
I do have further questions though. I've followed that guide I posted in my first post and set up the SDK in my copy of VS2008 (thankfully I had a copy!). I've added the code to create a dle file to test if the sample code works (which it does) although I get a pop up asking me about a Executable for the debug session. My question here is how would I add the .h files for the HapticMaster? Would this be via the "Project -> Properties" way or hard coded into "MyExtension.cpp"? I'm guessing so long as the cpp file finds the HapticMaster commands it doesn't matter. I take it that overwriting getPosition, getOrientation etc would be coded in MyExtension.cpp? The getPosition part will be easy I would use the code I used in my Ogre app, however I have a ADL Gimball attached to the HapticMaster which allows the arm to be controlled www.youtube.com/watch?v=RvXGnFky3c which uses 3 pot sensors to gather additional values. I take it that the code from the HapticMaster API to get these 3 values should be stored into getOrientation? Connection to the HapticMaster needed to obtain these values via a network connection. I take it just like my Ogre app I define this connection along with any other variables at the top of MyExtension.cpp just like any program? I'll have a go now and try to get it working, thanks to your post it seems alot clearer. It also means that now I know I can get the HapticMaster to work with Vizard4.0 we can put an order in. Many thanks, and I'm sure I will be back with any questions etc |
Quote:
Quote:
Quote:
Is the HapticMaster API publicly available? |
Many thanks for your reply.
That has cleared it up further, probably a way to go though! I take it that once the program has compiled and run producing the correct dle file the program is no longer needed? I'll use the sensor VS project files and extend it to work with the HapticMaster. The HapticMaster API isn't publicly available. But I can message you with an attachment with some HapticMaster API documentation. I'll do that now too. If its any help that would be great. I'll keep working on it and come back. Many thanks again. |
I didn't know if I should post this as a new topic but I guess its a continuation of this topic.
I have managed to get both the HapticMaster and Gimbal working with Vizard 4.0. So now we have 3DOF from the HapticMaster and 3DOF from the Gimbal making in total a 6DOF input into Vizard :) I've searched the forums but I can't find much about the inverse kinematic set up in Vizard 4.0. Currently I am trying to (and have succeed to a point) in moving the default character's (provided in the Vizard demo) hand to follow a point using lookAt. My problem is that in order to get the following other limbs (Right hand side only) would I use lock() etc and parent nodes in order to automatically kick in inverse kinematics, or would I have to do it by hand in order to get the movements working correctly? Any help or examples would be gratefully received. |
Hi pwsnow,
We ordered a HapticMaster and also want to get it working in Vizard. Is it possible to share your solution with us? Best, Jacco |
Quote:
Drop me a PM and we can exchange information. Once I have the IK fully working I will post the code here on the forum. The solver I am working on takes a vector position and a Quat orientation so can be used by both HapticMaster and manual input (mouse etc etc). Regards, Peter |
All times are GMT -7. The time now is 03:10 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC