Skip to content

Latest commit

 

History

History
37 lines (26 loc) · 885 Bytes

readme.rst

File metadata and controls

37 lines (26 loc) · 885 Bytes

pyspacenavigator

3Dconnexion Space Navigator in Python using raw HID (windows only)

Implements a simple interface to the 6 DoF 3Dconnexion Space Navigator device.

Requires pywinusb to access HID data -- this is Windows only.

Basic Usage:

import spacenavigator
import time

success = spacenavigator.open()
if success:
  while 1:
    state = spacenavigator.read()
    print state.x, state.y, state.z
    time.sleep(0.5)

State objects

State objects returned from read() have 7 attributes: [t,x,y,z,roll,pitch,yaw].

  • t: timestamp in seconds since the script started.
  • x,y,z: translations in the range [-1.0, 1.0]
  • roll, pitch, yaw: rotations in the range [-1.0, 1.0].