XGripper is a Python package for controlling Xense robotic grippers, their wrist cameras and visuotactile sensors.
The import package, the distribution name and the console script are all
xgripper. (The import package used to be spelled xensegripper while the
distribution was already xgripper; the two are now aligned.)
cd ~/XGripper
pip install -e .Pure Python — no compiler, no CMake, no system libraries required.
Removed: Vive Tracker support, the vendored
libsurvivesource and the bundledpysurviveruntime. Installing no longer builds any native code, sohidapiand theLIBRARY_PATHworkarounds it needed are gone. TheFlareGripaggregate inxense_gripper/went with it — useXenseGripper/XenseSerialGripperdirectly. See git history if you need any of it back.
| Component | Max Update Rate | Latency | Notes |
|---|---|---|---|
| Gripper (serial) | ~100 Hz | ~10ms | Serial round-trip, background poller |
| Tactile Sensor | ~33 Hz (single) | ~30ms | Blocking call, ~16 Hz for 2 sensors in serial |
The pure-serial gripper. Talks to the gripper MCU over a USB-serial port — no network, no MAC address.
from xgripper import XenseSerialGripper, read_board_sn
# The board SN identifies a gripper across ports.
sn = read_board_sn("/dev/ttyUSB0")
gripper = XenseSerialGripper(port="/dev/ttyUSB0", baudrate=115200)
gripper.set_position(40.0, vmax=80.0, fmax=27.0) # mm, mm/s, N
gripper.open_gripper()
gripper.close_gripper()
status = gripper.get_gripper_status() # position, velocity, force
gripper.calibrate()
gripper.shutdown()Position is in millimetres at the SDK boundary: 0 = fully closed,
85 = fully open.
XenseGripper is the abstract base; XenseSerialGripper (USB serial) and
XenseTCPGripper (network) implement it. XenseGripper.create(mac_addr=...)
returns whichever transport matches the arguments.
# Enumerate grippers, cameras and tactile sensors on this host
python examples/scan_system.py
# Remote sensor access through xensesdk's service layer
python examples/remote_example.pyxgripper --gripper # run the gripper node
xgripper --serial_number <SN> # run a sensor node
xgripper --camera <SN> # run a camera serverApache License 2.0