GHOSTŪ SDK FAQs
Please Note: The GHOST SDK is no longer officially supported. However, the following FAQs are still available:
GHOSTŪ SDK: General
GHOSTŪ SDK: Programming
PHANTOMŪ Hardware
PHANTOM Device Drivers: General
PHANTOM Device Drivers: Error Messages
GHOST SDK: General Information
What is different about the GHOST SDK?
Several things are "different" about the GHOST SDK.
The GHOST SDK is the first commercially available API which allows programmers to incorporate 3D Touch into their applications as easily as they now do 3D graphics. Programmers specify an object's 3D geometry and the physical properties associated with it - the GHOST SDK automatically takes care of generating high fidelity, stable, 3D force feedback. Programmers are isolated from the details of generating these force-feedback effects. If a developer does want to delve into the intricacies of the generation of force-feedback, however, the GHOST SDK provides mechanisms to do so.
The GHOST SDK is eminently extensible. It was designed from the beginning to allow developers to easily add and extend functionality.
The GHOST SDK also allows programs developed on a particular SensAble Technologies PHANTOM haptic interface on a particular computational platform/operating system to run on any PHANTOM haptic interface on any supported computer system. Using a different PHANTOM haptic interface model happens automatically without any changes to the executable. Code developed for one platform will require, at most, recompilation of the unchanged source code.
The GHOST SDK also makes it trivial to add a graphical representation of your geometry with the addition of GHOSTGL. GHOSTGL has support for all of the GHOST object types, making it as simple as adding 3 lines of code to get a graphical representation of your 3D scene.
Which SensAble devices does the GHOST SDK work with?
The GHOST SDK works with PHANTOMŪ devices that have:
-
EPP IEEE -1284 parallel port interface
-
SensAble Technologies, Inc.Ū PCI Interface Board for the PHANTOM Premium 1.0, 1.5 and 3.0 devices
What kinds of force feedback does the GHOST SDK support?
The GHOST SDK provides the capability to generate high fidelity, 3D haptic interaction (i.e., force feedback). The basic GHOST SDK development package allows the generation of force feedback of 4 basic types.
The first form of force-feedback is that associated with static 3D geometric models. The GHOST SDK allows a programmer to specify object geometry and the surface properties (i.e., feel) of those objects. The system then automatically generates the forces needed to let users feel the shape, compliance and friction associated with a given 3D geometry.
Secondly, the GHOST SDK allows users to make 3D objects "dynamic" or specify "behaviors". The programmer can specify the mass of a 3D object and the GHOST system automatically runs a high fidelity simulation that lets a user move the 3D object using the PHANTOM haptic interface. The object reacts with realistic physics in three dimensions and the user can feel and interact with this dynamic object. Restricted forms of dynamic behaviors are also provided which let the programmer associate the feel of things such as buttons, slider and dials with a 3D geometry.
The third type of force feedback, known as manipulators, generate force feedback effects when scaling, rotating and translating a 3D object using the PHANTOM haptic interface.
Finally, the GHOST SDK has a class of force-feedback, known as "spatial effects", which generate forces which are not directly associated with a 3D object. Examples of these spatial effects are buzzing or vibrating the PHANTOM haptic interface, the generation of point, line, and planar constraints which limit the motions of the PHANTOM, and the addition of apparent inertia to the PHANTOM haptic interface.
What kind of graphics does the GHOST SDK provide?
The GHOST SDK is a haptics or force-feedback rendering system. It is graphics package independent. The GHOST SDK, however, is designed to integrate with popular 3D graphics packages. In particular, callback mechanisms are provided which allow the programmer to synchronize the state of the haptics environment and the graphics environment.
The GHOST SDK, however, does supply GHOSTGL, a GL based graphical implementation of the base GHOST types. It makes representing basic GHOST scenes trivial.
What graphics packages does the GHOST SDK support?
GHOST SDK users have successfully developed applications that use OpenGL, Open Inventor, Performer and DirectModel. The example code provided as part of the basic GHOST SDK package utilizes OpenGL graphics.
GHOST SDK: Programming
How do I debug GHOST SDK code within the servo loop?
If you want to debug code that is within the GHOST servoloop, you should call the gstScene method setQuitOnDevFault(FALSE).
This will allow you to stop at a breakpoint in the servoloop, debug your code and continue the application execution without having to restart because of the "Device Fault = -4" error message. The method can be called immediately after instantiation of the gstScene instance.
When you are finished debugging your application, you should remove this call to ensure that all the safety mechanisms are being executing during actual use of the application.
How do I send forces directly to the PHANTOM device?
Since GHOST Version 2, there have been two main mechanisms for sending forces directly to the PHANTOM hardware. The first, which has been available since GHOST Version 1.0, is the gstEffect. The second is the gstForceField class, available since with GHOST Version 2.
An instance of either of these classes allows the developer to deliver forces to the PHANTOM device at each servoloop pass (i.e. at the 1 kHz rate). The developer subclasses the gstEffect or gstForceField class and overloads the calcEffectForce or calculateForceFieldForce method, respectively. Both of these methods are responsible for returning a gstVector for the force that should be applied to the PHANTOM hardware.
The main difference between the behaviors of these two classes is as follows:
gstEffect |
|
gstForceField |
|
GHOST v4.0 adds the gstDeviceIO class, which allows direct low-level interaction with the PHANTOM.
Why does the GHOST SDK complain that the servo loop takes too long with my gstTriPolyMeshHaptic object?
Collision detection between the PHANTOM endpoint and an arbitrary triangle is somewhat "expensive" from a computational point of view. Rather than perform collision detection on every iteration of the servo loop between all of the triangles and the PHANTOM endpoint, a spatial partition is created such that only "nearby" triangles are analyzed for collision detection. The benefits of spatial partitioning, however, are dependent upon many factors, such as the location of the PHANTOM endpoint relative to certain portions of your polymesh, the relative sizes of the triangles, etc.
The GHOST application may behave properly until the PHANTOM endpoint approaches points which require greater computational resources. The hload utility (located in the GHOST demos directory) can assist you in getting a better understand of the load which your GHOST application is placing on the system.
Are there issues between the GHOST SDK and Visual C++ 6.0?
Some incompatibilities between the GHOST SDK and Visual C++ 6.0 were found soon after the release of GHOST 2.1. The release of Service Pack 2 fixes the incompatibilities between GHOST's STL and the VC++ 6.0's STL. To avoid any furthur complications, ensure that the GHOST STL is referenced first in your application, and that you do not use functionality from any other STL.
GHOST v3.0 is perfectly compatible with Visual C++ 6.0.
Does GHOST support POSIX threads (pthreads)?
GHOST v3.0 added support for pthreads.
How do I specify non-default reset angles?
The GHOST SDK (Version 2.0 and later) for Windows NT stores reset angles in the Windows NT registry. Since the registry can not store floating point numbers, these reset angles must be converted to a hexadecimal notation according to a GHOST-specific convention.
PHANTOM Hardware
What are the hardware requirements for the PHANTOM?
To use a PHANTOM Premium, you will need a PC with an open 5V PCI slot for the hardware connection. To use a PHANTOM Desktop or 1.5 6DOF, you will need a PC that supports IEEE 1284 EPP/ECP specification. If you use a PC, we suggest no less than a PentiumŪ 166 MHz with at least 32 megabytes of memory (again, these specifications are minimums). We also recommend a 3D graphics accelerator card.
What operating systems does the PHANTOM Haptic Interface work with?
Currently, the PHANTOM Haptic Interface runs on Intel and most AMD-based machines running Windows 2000, and Windows XP. It also runs on Red Hat Linux 7.2. The PHANTOM Desktop should work on any Intel or AMD system. Dual (daisy-chained) Desktops and the 1.5 6DOF will work on any Intel or AMD MPX based system.
How does the PHANTOM haptic interface connect to the computer?
The PHANTOM Premium systems interface with your computer through a supplied PCI card. The interface card plugs into the PCI bus. We chose to use an internal bus, rather than a serial connection, to provide our customers with the highest bandwidth (and therefore highest fidelity) possible. A PHANTOM Desktop and 1.5 6DOF connect to your computer through a parallel port connection, as long as the parallel port supports the IEEE 1284 protocol (EPP or ECP port modes).
How do I set up a dual PHANTOM configuration?
To set up a dual PHANTOM Desktop configuration, simply "daisy chain" the devices together, connecting one to the parallel port, and the second Desktop to the port on the pack of the first. Configure both of the PHANTOMs separately using the PHANTOM Configuration utility, and enable the Dual Configuration.
To set up a dual PHANTOM configuration using PHANTOM devices other than a Desktop, ensure that you have the proper hardware. This will require either two ISA cards, a PCI card, or a VME card. Configure each card and PHANTOM device as you would in a single system. Then, enable the dual PHANTOM configuration on the PHANTOM Configuration utility. See your user's manual for more detailed instructions.
To run the "Two PHANTOM Blocks" demo that ships with the GHOST SDK, the PHANTOM devices must be named "PHANToM 1" and "PHANToM 2".
Does the PHANTOM device use brakes or motors?
The PHANTOM uses motors to control the forces.
What do the lights on the Amplifier Box indicate?
Power On: Illuminates when the Amplifier Box power is ON. If not illuminated, check to see that:
-
The power switch on the back of the box is switched to the ON position.
-
The 110V power cord is plugged into an outlet.
-
The 110V power cord is plugged into the Amplifier Box.
Remote Switch: The remote switch, also known as the kill switch, is the hand held switch or foot switch. This LED illuminates when the computer power is ON and the remote switch is in the ON position. The hand held switch is a "push-on"/ "push-off" switch whereas the foot switch is a momentary switch.
Software Enable: Illuminates when the PC interface card has enabled the power amplifier.
Axis 1, 2, 3: Illuminates when the respective Amplifiers are working.
What do the lights on the PHANTOM Desktop indicate?
Flashing green/yellow is the reset state for the hardware. If you just plugged in your phantom, you will see a flashing green/yellow light Flashing green occurs when the calibration offsets are not known, and the servo loop is on (i.e. the PHANTOM device is active).Solid green occurs when the calibration offsets are known, and the servo loop is on (the PHANTOM device is active). This does not necessarily mean that the calibration is correct, only that values are known.Solid yellow represents the idle state of the PHANTOM device. The driver will set this when an application has been quit and the amplifiers have been disabled.
Why am I having trouble running the PHANTOM Premium Line on my SGI NT Workstation 540 or 320?
The PCI interface on the SGI NT Workstation machines supports a 3.3V PCI card. The PHANTOM PCI card is a 5V card, which is unsupported in these computers. We have no plans to release a 3.3V card.
How can I change the BIOS Parallel Port Mode?
AMI BIOS: DEL > Peripheral Setup > Parallel Port Mode
Award BIOS: DEL > Integrated Peripherals > Parallel Port Mode
Dell BIOS: F2 > Integrated Devices > Parallel Port
Phoenix BIOS: F2 > Advanced > I/O Device Config > Mode
IBM BIOS: F1 > Devices and I/O Ports > Parallel Port Setup > Parallel Port Mode > Extended, > Parallel Port Extended Mode
This information is not guaranteed to be 100% accurate. Generally, this is how to access the menu to change the parallel port mode in these BIOSes (and BIOSes based off of these).
PHANTOM Device Drivers: General
How do I minimize conflicts when I install SensAble's PCI interface card?
Some installations of the PCI interface card turn out to be problematic on certain Windows platforms. This is due to three main interactions between PCI hardware on the system:
1. Bus mastering vs. secondary PCI slots | Bus mastering seems to be more reliable for the SensAble PCI card. The first two slots on the motherboard are usually the bus mastering slots. If possible, place the SensAble PCI card in one of these slots (refer to the hardware manual for your computer). |
2. Shared resources between slots | Certain PCI slots on the motherboard are designated to share resources. If possible, move the PCI card to a slot that does not share resources. Generally, the PCI card will not function if it is sharing an IRQ with another device. Most BIOSes give the ability to set IRQs for specific PCI slots. If your BIOS does not provide that capability, you will want to disable "Plug and Play" from the BIOS, and then set the IRQs using the Windows Device Manager. |
3. Non-volatile memory related to the assignment of PCI resources |
Windows reassigns resources to PCI devices at boot up. These settings are saved in non-volatile memory and are "partially" used during subsequent PCI hardware installations. There is a bug in this software which can assign and share resources between cards. Most of the problems related to SensAble's PCI interface card have come from the sharing of resources between PCI cards in the system. After installing the SensAble PCI interface card, some of the resources (particularly the interrupts) can become shared. This can result in "blue screens" if the non-SensAble PCI card does not recognize non-native interrupts and tries to process SensAble's PCI card interrupts. Most of this can be alleviated by adding the /PCILOCK option to the boot statement in the boot.ini file (usually located in c:\boot.ini) before installing the SensAble PCI interface card. If you have installed the card already and are having problems, remove the card, edit the boot.ini as below, shut down the system, install the SensAble PCI card and then power the system back up. For more information, see the Microsoft knowledge base article Q148501 - Preventing PCI Resource Conflicts on Intel-Based Computers. The PCILOCK option will maintain resource assignment for installed boards as long as they are still valid. This will reduce the chances for shared resource assignments after the SensAble PCI card is installed. Edit the boot.ini file to add the /PCILOCK option to operating statement: [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINNT="Windows NT Workstation Version 4.00" /PCILOCK If your PCI card still fails, you should try other slots on your machine. You are probably experiencing the shared resource problems between certain slots. |
How can I tell if the PCI card is installed properly on my SGI?
There are a couple of steps and commands that are helpful in debugging PCI card installations on SGIs (for the now deprecated GHOST for Irix):
-
Verify that the PCI card cage is installed correctly. Reseat, if not.
-
Look in the /dev directory for a device called phn0 mapped to the /hw directory.
-
Use hinv -v to view all of the installed devices (SensAble's vendor ID is 0x10b5).
-
Use versions to list what software is installed
Why does my Encoder Gimbal rotate 360 degrees graphically, when physically I only turn it 90 degrees?
Your Encoder Gimbal, with high resolution encoders, is most likely configured as a low resolution Encoder Gimbal. Change the Gimbal Encoders setting in the PHANTOM Configuration utility to High Resolution.
How do I make sure my PHANTOM Desktop auto-calibrates correctly?
Many issues concerning the auto-calibration of PHANTOM Desktops were corrected in PHANTOM Device Drivers Version 2.1. Further advances were made in Version 3.0. The key is to simply move the PHANTOM slowly throughout its workspace. If you find that your calibration is wrong, there are a few ways to force the PHANTOM Desktop to recalibrate. You can simply delete the "PHANTOM Configuration (Default PHANTOM)" file that resides in your /WINNT directory (or whatecer your Windows directory is called). Another simple method is to simply reconfigure your PHANTOM Desktop in the PHANTOM Configuration Control Panel. Reconfiguring (just change one option, and then change it back) causes the calibration to be deleted.
I am experiencing problems configuring my PHANTOM Desktop to work with my Windows based computer. What should I do?
Sometimes difficulties occur because not all computer hardware vendors are strictly compliant with the IEEE 1284 EPP/ECP specification. Computer hardware vendors have varied in their efforts to produce computers which are compliant with this specification, but computers produced in the last half of 1998 or later generally do not exhibit this problem.
Computers which are not compliant with this specification often have a BIOS configuration menu which does not allow the selection of ECP or EPP mode for the parallel port. These computers may, instead, collectively refer to all bidrectional communication modes with one menu choice.
Please consult with SensAble Customer Support before purchasing an add-on Parallel port card.
What do I need to consider if I am using a PHANTOM Desktop on a computer equipped with a hardware dongle lock
Some software packages use a hardware device called a "dongle" to ensure that the software is only used on the machine for which it is licensed. Usually, this device plugs into the parallel port of the computer. Since the PHANTOM Desktop device also plugs into this port, if you are using a software package which requires a dongle, you will need to understand the following considerations.
Hardware Considerations
The best performance from applications which utilize the PHANTOM Desktop will be achieved when the PHANTOM Desktop is attached directly to the main parallel port on the computer. A second parallel port card will be required for the dongle. You can use an ISA or PCI parallel port card such as those available from SIIG. In this configuration, it is recommended that the PHANTOM Desktop device attach to the main port and the dongle attach to the secondary port.
An alternate configuration that may provide sufficient performance on many computers is to plug the dongle into the main parallel port on the computer and plug the PHANTOM Desktop into the back of the dongle. Although some throughput is lost in going through the dongle, in practice this may not prove noticeable if the computer is fast enough.
Software Considerations
The way a dongle works is that the software package associated with the dongle "talks to" the dongle and asks whether a valid license exists. Early versions of this dongle "driver" software do not discriminate the dongle from other devices and may attempt to talk to all devices on all parallel ports. In doing so, the driver may attempt to erroneously communicate with the PHANTOM Desktop, causing delays in software start up. This has been corrected in newer versions of the dongle software. Additionally, a parameter setting exists which allows you to specify which port the dongle software should attempt communication with. For updated drivers or information on how to configure the dongle, please contact the software supplier who supplied the dongle.
Because both the PHANTOM Device Drivers and the dongle drivers operate at a very low level, they are not compatible when running simultaneously. As such, it is not possible to run applications requiring the PHANTOM Desktop at the same time as a "dongled" application. They should run fine independently if configured as described previously.
PHANTOM Device Drivers: Error Messages
Error Code -0: I am receiving the error "Enable amps unsuccessful. Please make sure the remote switch is on. Driver Error: check that the PHANTOM device driver software is installed correctly. Error Value: 0."
For the PHANTOM Premium Line, check to see that the remote switch on the Amplifier Box is turned on. For the PHANTOM Desktop, try changing the BIOS setting in both the PHANTOM Configuration and your computer's BIOS hardware configuration.
Error Code -1: I am running the PHANTOM interface and I receive this message: " #define PHTM_WARM_MOTORS -1 PHANTOM motors are overheated. Let them cool down and then restart the program." My PHANTOM device is not warm to the touch.
This error can usually be remedied by running PHANTOM Configuration in the Control Panel. If the error occurs frequently you can delete the file named PHANTOM Temperature in the /WINNT directory. This will erase all temperature data for the device. If you do this please be aware of the motor temperature because if the motors overheat, they are no longer useable.
Error Code -4: I am running GHOST SDK Demo programs and I get this error: " gstScene::servoLoop phantom send_force error .xxxx seconds since last servoLoop Device Fault. Check that remote switch is enabled and/or PHANTOM is connected properly. Error Value: -4".
The first thing to check when you get this error is that your PHANTOM hardware is set up correctly. Check the following:
-
The Amplifier Box is plugged in and turned on (remote switch light on front may still appear if the remote switch is enabled, even if the box is OFF).
-
The remote switch is plugged into the back of the Amplifier Box and is activated (toggle it once to make sure).
Another cause of this error is your PHANTOM may not have a watchdog timer circuit in it. If it does not, then you will want to uncheck the timeout circuit checkbox in the PHANTOM Configuration utility. One final thing to check with this error message is how many programs you have up and running while you are trying to run a GHOST application. If your computer is running too many programs it sometimes may not have the necessary power to also run a GHOST application. If this is the case, closing the other programs should solve your problem.
Error Code -25: I am running GHOST SDK on Irix 6.5 and I am receiving this message: "#define PHTM_NO_DRIVER -25"The PHANTOM drivers are not installed on this machine"".
This error usually indicates that you have not updated your GHOST software to 3.0. Irix 6.5 and GHOST 2.0 are not compatible. Irix 6.5 is supported on GHOST 2.1 and higher.
Error Code -28: I have setup the PHANTOM device and installed the drivers but when I try to use the GHOST SDK, I receive this error message: "#define PHTM_COMM_ERROR -28 "Unknown PHANTOM I/O Library error"".
This error usually indicates that you have not configured your PHANTOM device properly. To do so, go to PHANTOM Configuration in the Control Panel, and make sure all the information reflects the specifications of your PHANTOM hardware.
Terms and Conditions | Privacy Policy
© Copyright 2016 Sensable. All rights reserved.
|