feathersdk.robot.actuators.realhand.realhand Module¶
RealHand O6 dexterous hand driver for FeatherSDK.
Protocol (reverse-engineered from RealHand/core/can/real_hand_o6_can.py):
Standard (11-bit) CAN frames.
Arbitration id is the hand id:
0x27for the right hand,0x28for the left.data[0]is the “frame property” (the command/register),data[1:]is the payload. Sending a frame property with an empty payload is a query; the hand replies with a frame whosedata[0]echoes the frame property.
Frame properties used here:
Property |
Meaning |
Direction |
|---|---|---|
|
joint positions (6 x 0-255) |
set / query |
|
torque limits (6 x 0-255) |
set / query |
|
speeds (6 x 0-255) |
set / query |
|
normal pressure |
query |
|
tangential pressure |
query |
|
tangential pressure direction |
query |
|
proximity / approach induction |
query |
|
motor temperatures |
query |
|
motor fault codes |
query |
|
motor currents |
query |
|
firmware/embedded version (alt |
query |
Joint order (per RealHand docs) is:
[thumb_flexion, thumb_abduction, index, middle, ring, pinky]
All joint/speed/torque values are 0-255 where, for positions, 255 is fully
open and 0 is fully closed.
- class feathersdk.robot.actuators.realhand.realhand.RealHandVersion(value)¶
Bases:
UniqueEnum- O6 = 6¶
- class feathersdk.robot.actuators.realhand.realhand.RealHandParam(*, mode='r', dtype=0, id, default)¶
Bases:
PyDFrozenBaseModel- model_config: ClassVar[ConfigDict] = {'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class feathersdk.robot.actuators.realhand.realhand.RealHandParamSet¶
Bases:
objectCollection of all RealHand parameters. Each value is 8-bytes storing the 6 values (1 per finger) as single bytes in the lower 6-bytes of the value.
DTYPES were all uint64
- position: RealHandParam = RealHandParam(mode='rw', dtype=0, id=1, default=0)¶
Joint positions.
- torque_limit: RealHandParam = RealHandParam(mode='rw', dtype=0, id=2, default=100)¶
Torque limits.
- speed: RealHandParam = RealHandParam(mode='rw', dtype=0, id=5, default=255)¶
Finger speeds.
- normal_force: RealHandParam = RealHandParam(mode='r', dtype=0, id=32, default=0)¶
Normal force.
- tangential_force: RealHandParam = RealHandParam(mode='r', dtype=0, id=33, default=0)¶
Tangential force.
- tangential_dir: RealHandParam = RealHandParam(mode='r', dtype=0, id=34, default=0)¶
Tangential force direction.
- approach: RealHandParam = RealHandParam(mode='r', dtype=0, id=35, default=0)¶
Approach.
- temperature: RealHandParam = RealHandParam(mode='r', dtype=0, id=51, default=0)¶
Motor temperatures.
- errors: RealHandParam = RealHandParam(mode='r', dtype=0, id=53, default=0)¶
Motor error codes.
- current: RealHandParam = RealHandParam(mode='r', dtype=0, id=54, default=0)¶
Motor currents.
- version: RealHandParam = RealHandParam(mode='r', dtype=0, id=100, default=0)¶
Firmware version.
- class feathersdk.robot.actuators.realhand.realhand.RealHandConfig(*, name, id, endpoint='', shares_endpoint_with=None, requires_calibration=False, calibration_timeout=10.0, feedback_delay_threshold=0.1, feedback_delay_warning_interval=10.0, urdf_joint_name='', urdf_link_name='', version, default_speed=150, default_torque=180, message_block_timeout=0.3, message_send_attempts=2)¶
Bases:
MotorConfigConfiguration for a RealHand O6 hand.
- Parameters:
name (Annotated[str, MinLen(min_length=1), MaxLen(max_length=255)])
id (int)
requires_calibration (bool)
calibration_timeout (Annotated[float, Gt(gt=0), Le(le=120.0)])
feedback_delay_threshold (float)
feedback_delay_warning_interval (float)
urdf_joint_name (str)
urdf_link_name (str)
version (RealHandVersion)
message_block_timeout (Annotated[float, Gt(gt=0.0), Le(le=10.0)])
- version: RealHandVersion¶
The version of the hand.
- model_config: ClassVar[ConfigDict] = {'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class feathersdk.robot.actuators.realhand.realhand.RealHand(config, system)¶
Bases:
objectA single RealHand hand.
All values are integers in range 0-255. 255 is ‘max’ value, and is ‘fully open’ for positions.
Finger order: [thumb, thumb_abduction, index, middle, ring, pinky]
- Parameters:
config (RealHandConfig)
system (ActuatorSystem[TActuatorSystemConfig] | None)
- PARAM_SET: RealHandParamSet = <feathersdk.robot.actuators.realhand.realhand.RealHandParamSet object>¶
The parameter set for the hand.
- enable()¶
Does nothing, hand is always enabled
- Return type:
None
- disable()¶
Does nothing, hand is always enabled
- Return type:
None
- read_param(param, block=False)¶
Read a parameter from the hand.
- Parameters:
param (RealHandParam)
block (bool)
- Return type:
int | None
- write_param_all(param, values, block=False)¶
Write a parameter to the hand for all fingers.
- Parameters:
param (RealHandParam)
block (bool)
- Return type:
None
- set_speed(speed, block=False)¶
Set the speed for all fingers.
- set_torque(torque, block=False)¶
Set the torque for all fingers.
- set_position(position, block=False)¶
Set the position for all fingers.
- feathersdk.robot.actuators.realhand.realhand.handle_realhand_motor_message(router, result)¶
Handle an incoming RealHand motor message.
- Parameters:
router (MessageRouter)
result (CanSocketResult)
- Return type:
None