46 #ifndef CPhantomDevicesH 47 #define CPhantomDevicesH 49 #if defined(C_ENABLE_PHANTOM_DEVICE_SUPPORT) 100 static cPhantomDevicePtr
create(
unsigned int a_deviceNumber) {
return (std::make_shared<cPhantomDevice>(a_deviceNumber)); }
111 virtual bool close();
114 virtual bool calibrate(
bool a_forceCalibration =
false);
180 #endif // C_ENABLE_PHANTOM_DEVICE_SUPPORT This class implements a 3D vector.
Definition: CVector3d.h:88
int m_deviceID
Device ID number among the Phantom devices connected to the computer.
Definition: CPhantomDevices.h:172
static bool openLibraries()
This method opens libraries for this class of devices.
Definition: CPhantomDevices.cpp:177
virtual bool close()
This method close the connection to the haptic device.
Definition: CPhantomDevices.cpp:674
virtual bool calibrate(bool a_forceCalibration=false)
This method calibrates the haptic device.
Definition: CPhantomDevices.cpp:700
const unsigned int C_MAX_DEVICES
Definition: CGenericDevice.h:65
virtual bool getPosition(cVector3d &a_position)
This method returns the position of the device.
Definition: CPhantomDevices.cpp:722
Implements a base class for haptic devices.
This class implements a 3D matrix.
Definition: CMatrix3d.h:97
virtual ~cPhantomDevice()
Destructor of cPhantomDevice.
Definition: CPhantomDevices.cpp:622
virtual bool open()
This method open a connection to the haptic device.
Definition: CPhantomDevices.cpp:648
static bool closeLibraries()
This method closes libraries for this class of devices.
Definition: CPhantomDevices.cpp:347
This class implements a base class for haptic devices.
Definition: CGenericHapticDevice.h:280
virtual bool getRotation(cMatrix3d &a_rotation)
This method returns orientation frame of the haptic device end-effector.
Definition: CPhantomDevices.cpp:758
static unsigned int s_libraryCounter
Number of instances for this class of devices currently using the libraries.
Definition: CPhantomDevices.h:162
cPhantomDevice(unsigned int a_deviceNumber)
Constructor of cPhantomDevice.
Definition: CPhantomDevices.cpp:427
std::shared_ptr< cPhantomDevice > cPhantomDevicePtr
Definition: CPhantomDevices.h:68
static bool s_allocationTable[C_MAX_DEVICES]
Allocation table for devices of this class. true means that the device has been allocated, false means free.
Definition: CPhantomDevices.h:159
virtual bool getUserSwitches(unsigned int &a_userSwitches)
This method returns the status of all user switches [true = ON / false = OFF].
Definition: CPhantomDevices.cpp:834
static unsigned int getNumDevices()
This method returns the number of haptic devices available for this class of devices.
Definition: CPhantomDevices.cpp:400
This class implements an interface to all 3D-System Phantom haptic devices.
Definition: CPhantomDevices.h:86
Definition: CAudioBuffer.cpp:56
virtual bool setForceAndTorqueAndGripperForce(const cVector3d &a_force, const cVector3d &a_torque, double a_gripperForce)
This method sends a force, torque, and gripper force to the haptic device.
Definition: CPhantomDevices.cpp:800
static cPhantomDevicePtr create(unsigned int a_deviceNumber)
Shared cPhantomDevice allocator.
Definition: CPhantomDevices.h:100