Public Member Functions | List of all members
SurgSim::Device::NovintDevice Class Reference

A class implementing the communication with a Novint Falcon device. More...

#include <SurgSim/Devices/Novint/NovintDevice.h>

Inheritance diagram for SurgSim::Device::NovintDevice:
SurgSim::Device::NovintCommonDevice SurgSim::Input::CommonDevice SurgSim::Input::DeviceInterface

Public Member Functions

 NovintDevice (const std::string &uniqueName, const std::string &initializationName)
 Constructor. More...
 
virtual ~NovintDevice ()
 Destructor. More...
 
- Public Member Functions inherited from SurgSim::Device::NovintCommonDevice
 NovintCommonDevice (const std::string &uniqueName, const std::string &initializationName)
 Constructor. More...
 
virtual ~NovintCommonDevice ()
 Destructor. More...
 
std::string getInitializationName () const
 Gets the name used by the Novint device configuration to refer to this device. More...
 
virtual bool initialize () override
 Fully initialize the device. More...
 
virtual bool finalize () override
 Finalize (de-initialize) the device. More...
 
bool isInitialized () const
 Check whether this device is initialized. More...
 
void setPositionScale (double scale)
 Sets the position scale for this device. More...
 
double getPositionScale () const
 Gets the position scale for this device. More...
 
void setOrientationScale (double scale)
 Sets the orientation scale for this device. More...
 
double getOrientationScale () const
 Gets the orientation scale for this device. More...
 
- Public Member Functions inherited from SurgSim::Input::CommonDevice
 CommonDevice (const std::string &name)
 Constructor. More...
 
 CommonDevice (const std::string &name, const SurgSim::DataStructures::DataGroup &inputData)
 Constructor. More...
 
 CommonDevice (const std::string &name, SurgSim::DataStructures::DataGroup &&inputData)
 Constructor. More...
 
virtual ~CommonDevice ()
 Destructor. More...
 
virtual std::string getName () const override
 Return a (hopefully unique) device name. More...
 
void setNameForCallback (const std::string &name)
 Set the name used for calling the input consumers and output producer. More...
 
std::string getNameForCallback () const
 Get the name used for calling the input consumers and output producer. More...
 
virtual bool addInputConsumer (std::shared_ptr< InputConsumerInterface > inputConsumer) override
 Connect this device to an InputConsumerInterface, which will receive the data that comes from this device. More...
 
virtual bool removeInputConsumer (std::shared_ptr< InputConsumerInterface > inputConsumer) override
 Disconnect this device from an InputConsumerInterface, which will no longer receive data from this device. More...
 
virtual bool setOutputProducer (std::shared_ptr< OutputProducerInterface > outputProducer) override
 Connect this device to an OutputProducerInterface, which will send data to this device. More...
 
virtual bool removeOutputProducer (std::shared_ptr< OutputProducerInterface > outputProducer) override
 Disconnect this device from an OutputProducerInterface, which will no longer send data to this device. More...
 
virtual bool hasOutputProducer () override
 Getter for whether or not this device is connected with an OutputProducerInterface. More...
 
- Public Member Functions inherited from SurgSim::Input::DeviceInterface
virtual ~DeviceInterface ()
 Virtual destructor (empty). More...
 

Additional Inherited Members

- Protected Member Functions inherited from SurgSim::Input::CommonDevice
virtual void pushInput ()
 Push application input to consumers. More...
 
virtual bool pullOutput ()
 Pull application output from a producer. More...
 
SurgSim::DataStructures::DataGroupgetInputData ()
 Getter for the input data DataGroup. More...
 
const SurgSim::DataStructures::DataGroupgetOutputData () const
 Getter for the output data DataGroup. More...
 

Detailed Description

A class implementing the communication with a Novint Falcon device.

This should provide basic support for any device that can communicate using the Novint HDAL SDK toolkit, such as the off-the-shelf Novint Falcon haptic gaming controller. Note that certain devices may require device-specific support in the code to enable particular hardware features. In particular, the Novint Falcon with the Open Surgery Grip will not be able to produce torques unless it is accessed using the Novint7DofHapticDevice class.

Application input provided by the device:
type name
pose "pose" Device pose (units are meters).
bool "button1" State of the first device button if present.
bool "button2" State of the second device button if present.
bool "button3" State of the third device button if present.
bool "button4" State of the third device button if present.
bool "isHomed" Device homing status.
Note that button1 through 4 correspond to the buttons 0 through 3 provided by the HDAL SDK, but a custom Novint device might have fewer than 4 buttons.
Application output used by the device:
type name
vector "force" Device output force (units are newtons).
bool "gravityCompensation" Enable or disable hardware gravity compensation.
See also
Novint7DofHapticDevice
NovintCommonDevice, SurgSim::Input::CommonDevice, SurgSim::Input::DeviceInterface

Constructor & Destructor Documentation

SurgSim::Device::NovintDevice::NovintDevice ( const std::string &  uniqueName,
const std::string &  initializationName 
)

Constructor.

Parameters
uniqueNameA unique name for the device that will be used by the application.
initializationNameThe name passed to HDAL when initializing the device. This should match a configured Novint device; alternately, an empty string indicates the default device.
SurgSim::Device::NovintDevice::~NovintDevice ( )
virtual

Destructor.


The documentation for this class was generated from the following files: