forcedimension_core.constants module
- class forcedimension_core.constants.ComMode(value)[source]
Bases:
IntEnumCommunication mode with the device. USB operations using
forcedimension.constants.ComMode.SYNCandforcedimension.constants.ComMode.ASYNC. Other operation modes are reported for virtual devices (forcedimension.constants.ComMode.VIRTUAL) and devices that are connected over the network (forcedimension.constants.ComMode.NETWORK).- ASYNC = 1
The asynchronous USB mode is the default. The asynchronous USB mode allows the operating system to parallelise the read and write operations on the USB port. This parallel operation improves refresh rate stability by reducing communication jitter. Other factors also influence USB performance, including the choice of operating system, machine load and program optimisation.
- NETWORK = 4
This mode is reported when connected to a haptic device using the Force Dimension network connection mode.
- SYNC = 0
The synchronous USB mode performs USB read and write operations in sequence, allowing for a theoretical haptic refresh rate of 4 kHz. Please note that Other factors also influence USB performance, including the choice of operating system, machine load and program optimisation.
- VIRTUAL = 3
This mode is reported when connected to a virtual device.
- forcedimension_core.constants.DEFAULT_TIMEGUARD_US: Final[int] = -1
Convinence constant used to set device to default timeguard value Not the actual default timeguard value.
- forcedimension_core.constants.DEFAULT_VELOCITY_WINDOW: Final[int] = 20
Default velocity window size
- forcedimension_core.constants.DELTA_IDX: Final[Tuple[Literal[0], Literal[1], Literal[2]]] = (0, 1, 2)
Array index for motors/encoders of the WRIST structure. i.e. DELTA motor/encoder 0 has index 0
- class forcedimension_core.constants.DeviceType(value)[source]
Bases:
IntEnumSupported device type IDs as an enumeration.
- CONTROLLER = 81
- CONTROLLER_HR = 82
- CUSTOM = 91
- DELTA3 = 63
- FALCON = 60
- LAMBDA3 = 203
- LAMBDA7_LEFT = 109
- LAMBDA7_RIGHT = 108
- NONE = 0
- OMEGA3 = 33
- OMEGA6_LEFT = 36
- OMEGA6_RIGHT = 34
- OMEGA7_LEFT = 37
- OMEGA7_RIGHT = 35
- SIGMA3 = 206
- SIGMA7_LEFT = 105
- SIGMA7_RIGHT = 104
- class forcedimension_core.constants.ErrorNum(value)[source]
Bases:
IntEnumError numbers reported by DHD as an enumeration.
- COM = 2
- CONFIGURATION = 14
- DEPRECATED = 16
- DEVICE_IN_USE = 20
- DEVICE_NOT_READY = 12
- DHC_BUSY = 3
- ERROR = 1
- EXPERT_MODE_DISABLED = 9
- FILE_NOT_FOUND = 13
- GEOMETRY = 8
- INVALID = 21
- INVALID_INDEX = 15
- NOT_AVAILABLE = 6
- NOT_ENABLED = 19
- NOT_IMPLEMENTED = 10
- NO_DEVICE_FOUND = 5
- NO_DRIVER_FOUND = 4
- NO_ERROR = 0
- NO_REGULATION = 22
- NULL_ARGUMENT = 17
- OUT_OF_MEMORY = 11
- REDUNDANT_FAIL = 18
- TIMEOUT = 7
- class forcedimension_core.constants.ForceOffCause(value)[source]
Bases:
IntEnumThe event that caused forces to be disabled on the device (the last time forces were turned off).
Info
Not all devices suppport all the force-disabling mechanisms listed above.
- BUTTON = 1
- DEADMAN = 6
- FORCES_NOT_OFF = 0
- SOFTWARE = 4
- USBDISCN = 5
- VELOCITY = 2
- WATCHDOG = 3
- class forcedimension_core.constants.Handedness(value)[source]
Bases:
IntEnumAn enumeration.
- LEFT = 1
- NONE = 0
- RIGHT = 2
- forcedimension_core.constants.MAX_BUTTONS: Final[int] = 32
Maximum number of buttons a device can have
- forcedimension_core.constants.MAX_STATUS: Final[int] = 17
Maximum number of elements in a status tuple
- forcedimension_core.constants.MOTOR_SATURATED: Final[int] = 2
Return value used when at least one of the motors cannot deliver the requested torque. Motor groups are scaled in order to preserve force and torque direction over magnitude.
- class forcedimension_core.constants.NovintButtonID(value)[source]
Bases:
IntEnumEnumeration mapping button type to button ID for the Novint Falcon.
- CENTER = 0
- LEFT = 1
- RIGHT = 3
- UP = 2
- class forcedimension_core.constants.StatusIndex(value)[source]
Bases:
IntEnumIndex of statuses in the DHD status vector as an enumeration.
- BRAKE = 6
- CONNECTED = 1
- ERROR = 9
- FORCE = 5
- FORCEOFFCAUSE = 14
- GRAVITY = 10
- IDLE = 4
- POWER = 0
- REDUNDANCY = 13
- RESET = 3
- STARTED = 2
- TIMEGUARD = 11
- TORQUE = 7
- WRIST_DETECTED = 8
- WRIST_INIT = 12
- forcedimension_core.constants.TIMEGUARD: Final[int] = 1
Return value used when the TimeGuard feature prevented an unnecessary communication with the device.
- class forcedimension_core.constants.ThreadPriority(value)[source]
Bases:
IntEnumAn enumeration.
- DEFAULT = 0
- HIGH = 1
- LOW = 2
- class forcedimension_core.constants.VelocityEstimatorMode(value)[source]
Bases:
IntEnumSupported velocity estimator modes. Currently only WINDOWING mode is available.
- WINDOWING = 0
The default velocity estimator mode. In this mode, the velocity is estimated by comparing the current position with the position a given time interval ago.