feathersdk.robot.actuator_systems.torso_system Module

class feathersdk.robot.actuator_systems.torso_system.TorsoSystemConfig(*, module_name='torso_system', safe_stop_policy=SafeStopPolicy.COMPLIANCE_MODE, operating_frequency=30, actuators_share_same_endpoint=True)

Bases: ActuatorSystemConfig

Configuration for the torso system.

Parameters:
module_name: str

The name of the torso system.

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class feathersdk.robot.actuator_systems.torso_system.TorsoSystem(config, *args, **kwargs)

Bases: ActuatorSystem[TTorsoSystemConfig]

A torso system.

Parameters:

config (TTorsoSystemConfig)

class feathersdk.robot.actuator_systems.torso_system.EZMotionTorsoSystemConfig(*, module_name='torso_system', safe_stop_policy=SafeStopPolicy.CANNOT_ENTER_SAFE_STOP, operating_frequency=30, actuators_share_same_endpoint=True, lift_motor, direction=1, max_height_mm, min_height_mm, decelerate_stop_in_velocity_control=True)

Bases: TorsoSystemConfig

Configuration for the EZMotion torso system.

Parameters:
safe_stop_policy: SafeStopPolicy

The safe stop policy for the torso system.

lift_motor: EZMotionMotorConfig

The configuration for the torso lift motor.

direction: Literal[1, -1]

The direction of the torso lift motor. 1 means encoder counts increase as the height increases, -1 means encoder counts increase as the height decreases.

max_height_mm: float

The maximum height of the torso in millimeters from the bottom.

min_height_mm: float

The minimum height of the torso in millimeters from the bottom.

decelerate_stop_in_velocity_control: bool

Whether to decelerate when setting the velocity to 0 in update_velocity().

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class feathersdk.robot.actuator_systems.torso_system.EZMotionTorsoSystem(config, *args, **kwargs)

Bases: TorsoSystem[EZMotionTorsoSystemConfig]

An EZMotion torso system.

Parameters:

config (EZMotionTorsoSystemConfig)

lift_motor: EZMotionMotor[EZMotionMotorConfig]

The lift motor.

await_action_complete()

Waits until the last sent action is complete.

Return type:

None

recalibrate(allow_load=False, block=False)

Recalibrate the lift motor.

Parameters:
  • allow_load (bool) – If True, allow the torso system to load calibration state from file instead of recalibrating.

  • block (bool) – Whether to block the current thread until the recalibration is complete.

Return type:

None

disable()

Disable the torso system.

Return type:

None

go_to(height, velocity=None, block=False)

Go to the given height from the bottom of the torso.

Parameters:
  • height (float) – The height to go to in millimeters from the bottom of the torso.

  • velocity (float) – The velocity to go to in millimeters per second. If None, the velocity will be set to the target velocity of the lift motor. Must be positive.

  • block (bool) – Whether to block the current thread until the action has been confirmed sent/received by the motor.

Return type:

None

update_velocity(velocity, block=False)

Update the velocity of the torso system.

Velocity is set by targeting the top/bottom of the height range with the given velocity.

Parameters:
  • velocity (float) – The velocity to update the torso system to in millimeters per second. Set negative to move torso down, positive to move up.

  • block (bool) – Whether to block the current thread until the action has been confirmed sent/received by the motor.

Return type:

None

get_height(fresh_value=False)

Get the current height from the bottom of the torso.

Parameters:

fresh_value (bool) – Whether to get the current height from the motor’s telemetry. If False, the last value read from the motor will be returned (which should update at ~self.config.operating_frequency Hz)

Return type:

float

get_velocity()

Get the current velocity of the torso in millimeters per second.

Return type:

float