feathersdk.robot.torso_platform Module

class feathersdk.robot.torso_platform.EZMotionCommands(*values)

Bases: Enum

EZMotion CANopen command addresses.

GET_CURRENT_CURRENT = 24696
GET_CURRENT_POSITION = 24676
GET_CURRENT_TORQUE = 24695
GET_CURRENT_VELOCITY = 24684
GET_ERROR_REGISTER = 8203
GET_STATUS_WORD = 24641
GET_TEMPERATURE = 8256
HOMING_ACCELERATION = 24730
HOMING_METHOD = 24728
HOMING_OFFSET = 24700
HOMING_SPEED = 24729
MAX_TORQUE = 24690
SET_CONTROL_MODE = 24672
SET_MAX_ACCELERATION = 24707
SET_MAX_DECELERATION = 24708
SET_MAX_HOMING_TORQUE = 8304
SET_MAX_VELOCITY = 24705
SET_OPERATION_STATE = 24640
SET_POSITION = 24698
SET_VELOCITY = 24831
class feathersdk.robot.torso_platform.EZMotionControlMode(*values)

Bases: Enum

EZMotion motor control modes.

HOMING = 6
POSITION = 1
VELOCITY = 3
class feathersdk.robot.torso_platform.EZMotionHomingMethod(*values)

Bases: Enum

EZMotion homing methods.

HOME_USING_MAX_TORQUE_DOWN = -2
HOME_USING_MAX_TORQUE_UP = -3
class feathersdk.robot.torso_platform.EZMotionMotor(motor_id: int, can_interface: str, motor_name: str, config: dict)

Bases: Motor

EZMotion motor representation.

__init__(motor_id: int, can_interface: str, motor_name: str, config: dict)

Initialize EZMotion motor.

Parameters:
  • motor_id (int) – CAN node ID of the motor

  • can_interface (str) – CAN interface name

  • motor_name (str) – Name identifier for the motor

  • config (dict) – Motor configuration with optional keys: - default_target_velocity_rps: Default target velocity in rotations per second - default_target_acceleration_rps2: Default acceleration in rotations per second squared - default_target_deceleration_rps2: Default deceleration in rotations per second squared

class feathersdk.robot.torso_platform.EZMotionOperationState(*values)

Bases: Enum

EZMotion motor operation states.

ENABLED = 15
SHUTDOWN = 6
TRANSITION_TO_NEW_POSITION = 31
class feathersdk.robot.torso_platform.EZMotionTorsoPlatform(motors_manager: MotorsManager, power: BatterySystem, can_interface: str | None, config: dict)

Bases: TorsoPlatform

EZMotion-based torso platform implementation.

__init__(motors_manager: MotorsManager, power: BatterySystem, can_interface: str | None, config: dict)

Initialize EZMotion torso platform.

Parameters:
  • motors_manager (MotorsManager) – Manager for motor communication

  • power (BatterySystem) – Battery system for power event handling

  • can_interface (Optional[str]) – CAN interface name, or None to skip CAN initialization

  • config (dict) – Configuration dictionary with required “motors” key and optional keys: - top_height_mm: Maximum height in millimeters (default: 600) - bottom_height_mm: Minimum height in millimeters (default: 50) - homing_offset_from_top_num_rotations: Homing offset from top in rotations (default: 1) - homing_max_torque_percent: Maximum torque for homing in percent (default: 1000) - homing_acceleration: Homing acceleration in rotations per second squared (default: 50) - print_packet_loss: If True, print packet loss warnings (default: False) - show_all_sdo_errors: If True, show all SDO errors (default: True)

Raises:

Exception – If power cycle detected and system must be recalibrated

calc_max_height_target_position(*args, **kwargs)
calc_min_height_target_position(*args, **kwargs)
canopen_thread_main(*args, **kwargs)
clear_errors(*args, **kwargs)
enable()

Enable motor operation.

enable_velocity_mode(*args, **kwargs)
get_current_position(*args, **kwargs)
get_current_position_with_retry(*args, **kwargs)
get_current_torque(*args, **kwargs)
get_current_velocity(*args, **kwargs)
get_state(*args, **kwargs)
get_status_word(*args, **kwargs)
go_to(*args, **kwargs)
has_error(*args, **kwargs)
health_check(*args, **kwargs)
init_ezmotion(*args, **kwargs)
on_abort(*args, **kwargs)
on_fork()
on_power_event(*args, **kwargs)
recalibrate(*args, **kwargs)
send_movement_profile(*args, **kwargs)
set_control_mode(*args, **kwargs)
set_movement_profile(*args, **kwargs)
shutdown(*args, **kwargs)
transition_to_new_position(*args, **kwargs)
update_relative(*args, **kwargs)
update_velocity(*args, **kwargs)
wait_for_recalibration(*args, **kwargs)
class feathersdk.robot.torso_platform.TorsoPlatform

Bases: SteppableSystem

Base class for torso platform control.

__init__()

Initialize torso platform.

async get_position()
async get_state()
go_to(height_from_bottom: float)
async health_check()
recalibrate()
set_movement_profile(target_velocity, target_acceleration, target_jerk)
feathersdk.robot.torso_platform.overwrite_file(filepath: str, data: list)

Overwrite file with comma-separated data.

Parameters:
  • filepath (str) – Path to the file to overwrite

  • data (list) – List of strings to write as comma-separated values

feathersdk.robot.torso_platform.read_array_from_file(filepath: str)

Read comma-separated values from file.

Parameters:

filepath (str) – Path to the file to read

Returns:

List of strings read from the file

Return type:

list