|
| NovintScaffold (const NovintScaffold &) |
|
NovintScaffold & | operator= (const NovintScaffold &) |
|
bool | registerDevice (NovintDevice *device) |
| Registers the specified device object, and starts the servo loop if necessary. More...
|
|
bool | unregisterDevice (const NovintDevice *device) |
| Unregisters the specified device object. More...
|
|
bool | initializeDeviceState (DeviceData *info) |
| Initializes a single device, creating the necessary HDAL resources. More...
|
|
std::shared_ptr< NovintScaffold::Handle > | findHandleByInitializationName (const std::string &initializationName) |
| Get the Handle associated with an initialization name, if any. More...
|
|
bool | updateDeviceInput (DeviceData *info) |
| Updates the device information for a single device's input. More...
|
|
bool | updateDeviceOutput (DeviceData *info, bool pulledOutput) |
| Updates the device information for a single device's output. More...
|
|
void | checkDeviceHoming (DeviceData *info) |
| Checks whether a device has been homed. More...
|
|
void | calculateForceAndTorque (DeviceData *info) |
| Calculates forces, and torques if the device is a 7Dof, and sends them to the HDAL. More...
|
|
void | setInputData (DeviceData *info) |
| Sets the input DataGroup, which will be pushed to the InputComponent. More...
|
|
std::map< std::string, std::string > | getNameMap () |
| Gets the map from name to serial number. More...
|
|
bool | createAllHandles () |
| Creates a NovintScaffold::Handle for each device connected when the first registerDevice is called. More...
|
|
void | destroyAllHandles () |
| Destroys all the initialized handles. More...
|
|
bool | storeHandleIfValid (const std::shared_ptr< Handle > &handle, const std::string &serial) |
| Store the handle if it is valid. More...
|
|
void | runHapticFrame () |
| Executes the operations for a single haptic frame. More...
|
|
bool | getGravityCompensation (const DeviceData *info, bool *gravityCompensationState) |
| Gets the gravity compensation flag for the current device. More...
|
|
bool | enforceGravityCompensation (const DeviceData *info, bool gravityCompensationState) |
| Attempts to force the gravity compensation flag for the current device to the specified value. More...
|
|
bool | setGravityCompensation (const DeviceData *info, bool gravityCompensationState) |
| Sets the gravity compensation flag for the current device, unless it's already set as desired. More...
|
|
void | setPositionScale (const NovintDevice *device, double scale) |
| Sets the position scale for this device. More...
|
|
void | setOrientationScale (const NovintDevice *device, double scale) |
| Sets the orientation scale for this device. More...
|
|
A class that manages Novint Falcon devices.
This should support any device that can communicate using the Novint HDAL SDK toolkit, such as the off-the-shelf Novint Falcon gaming controller and the Novint Falcon with the Open Surgery Grip.
- See also
- SurgSim::Devices::NovintDevice
void SurgSim::Devices::NovintScaffold::calculateForceAndTorque |
( |
DeviceData * |
info | ) |
|
|
private |
Calculates forces, and torques if the device is a 7Dof, and sends them to the HDAL.
The force to output is composed of a vector named "force" in the output data, plus contributions from two optional Jacobians. If the matrix "springJacobian" is provided in the output data, a spring force & torque are generated from its product with the difference between the current pose and the pose in the output data named "inputPose". A damping force & torque are generated similarly. The intention is for a Behavior to calculate a nominal force & torque as well as the desired linearized changes to the force & torque based on changes to the input's pose & velocities. Then the linearized deltas to the output force & torque can be calculated at the haptic update rates, thereby smoothing the output response to motion.
- Parameters
-
- Note
- The DeviceData's parameter mutex should be locked before this function is called.
bool SurgSim::Devices::NovintScaffold::enforceGravityCompensation |
( |
const DeviceData * |
info, |
|
|
bool |
gravityCompensationState |
|
) |
| |
|
private |
Attempts to force the gravity compensation flag for the current device to the specified value.
Sets the flag repeatedly, until it reports the desired value, in order to work around the problem where attempts to set the gravity compensation do not always change the actual gravity compensation flag in the device.
Logs a message if the state is known to have been changed.
- Parameters
-
info | The device data. |
gravityCompensationState | Desired state of the gravity compensation flag. |
- Returns
- true if it succeeds, false if it fails.