Force & Haptic Messages

Force/torque sensing and haptic feedback types for manipulation and human-robot interaction.

from horus import WrenchStamped, ForceCommand, ContactInfo, HapticFeedback

WrenchStamped

6-DOF force/torque measurement with timestamp.

wrench = horus.WrenchStamped(
    fx=0.5, fy=0.0, fz=-9.81,
    tx=0.0, ty=0.1, tz=0.0,
    timestamp_ns=horus.timestamp_ns(),
)
FieldTypeDefaultDescription
fx, fy, fzfloat0.0Force components (N)
tx, ty, tzfloat0.0Torque components (Nm)
timestamp_nsint0Timestamp in nanoseconds

ForceCommand

Force/torque command for impedance or force control.

cmd = horus.ForceCommand(
    fx=0.0, fy=0.0, fz=-5.0,
    tx=0.0, ty=0.0, tz=0.0,
    timeout=1.0,
    timestamp_ns=horus.timestamp_ns(),
)
FieldTypeDefaultDescription
fx, fy, fzfloat0.0Force components (N)
tx, ty, tzfloat0.0Torque components (Nm)
timeoutfloat0.0Command timeout (seconds)
timestamp_nsint0Timestamp in nanoseconds

ContactInfo

Contact state information.

contact = horus.ContactInfo(state=1, contact_force=2.5, confidence=0.9, timestamp_ns=horus.timestamp_ns())
FieldTypeDefaultDescription
stateint0Contact state code
contact_forcefloat0.0Contact force magnitude (N)
confidencefloat0.0Detection confidence
timestamp_nsint0Timestamp in nanoseconds

ImpedanceParameters

Impedance control parameters (stiffness, damping). Created with no parameters — read via getters.

imp = horus.ImpedanceParameters()

# Read-only getters
imp.stiffness     # list[float]
imp.damping       # list[float]
imp.inertia       # list[float]
imp.force_limits  # list[float]
imp.enabled       # bool
GetterTypeDescription
stiffnesslist[float]Stiffness values per axis
dampinglist[float]Damping values per axis
inertialist[float]Inertia values per axis
force_limitslist[float]Force limits per axis
enabledboolWhether impedance control is enabled

HapticFeedback

Haptic feedback command for teleoperation.

haptic = horus.HapticFeedback(
    vibration_intensity=0.8,
    vibration_frequency=100.0,
    duration_seconds=0.05,
    pattern_type=0,
)
FieldTypeDefaultDescription
vibration_intensityfloat0.0Vibration intensity (0.0-1.0)
vibration_frequencyfloat0.0Vibration frequency (Hz)
duration_secondsfloat0.0Duration in seconds
pattern_typeint0Haptic pattern type

TactileArray

Tactile sensor array (e.g., fingertip pressure grid).

tactile = horus.TactileArray(rows=4, cols=4)
FieldTypeDefaultDescription
rowsint0Number of rows
colsint0Number of columns

See Also