feathersdk.robot.actuators.ezmotion.ezmotion Module¶
- feathersdk.robot.actuators.ezmotion.ezmotion.EC_PER_ROT = 65536¶
The number of encoder counts per rotation of the motor.
- class feathersdk.robot.actuators.ezmotion.ezmotion.EZMotionError(value)¶
Bases:
UniqueIntEnumEZMotion error codes.
- OCP = 0¶
- ULVO = 1¶
- LOCK = 2¶
- VIN_LIMIT = 3¶
- OVERLOAD = 4¶
- POS_LIMIT = 5¶
- SENSOR_ERR = 6¶
- OVER_VOLTAGE = 9¶
- class feathersdk.robot.actuators.ezmotion.ezmotion.EZMotionMotorConfig(*, name, id, endpoint='', shares_endpoint_with=None, requires_calibration, calibration_timeout=60.0, feedback_delay_threshold=0.1, feedback_delay_warning_interval=10.0, urdf_joint_name='', urdf_link_name='', telemetry_size=16384, teensy_telemetry_max_size=300, target_velocity=131072, target_acceleration=3276800, target_deceleration=3276800, homing_torque=750, homing_offset=131072, homing_speed=327680, homing_acceleration=3276800, homing_timeout=60, message_block_timeout=0.3, message_send_attempts=2)¶
Bases:
MotorConfigThe config for the EZMotion motor.
- 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)
teensy_telemetry_max_size (Annotated[int, Gt(gt=0), Le(le=65535)])
target_acceleration (Annotated[int, Ge(ge=1), Le(le=6553600)])
target_deceleration (Annotated[int, Ge(ge=1), Le(le=6553600)])
homing_acceleration (Annotated[int, Ge(ge=1), Le(le=6553600)])
message_block_timeout (Annotated[float, Gt(gt=0.0), Le(le=10.0)])
- teensy_telemetry_max_size: int¶
Cap sent to the Teensy for each parameter ring. Actual size might be smaller.
- target_acceleration: int¶
The target acceleration for the motor in encoder counts per second squared.
- target_deceleration: int¶
The target deceleration for the motor in encoder counts per second squared.
- homing_offset: int¶
After finding homing position, move this many encoder counts away from homing position to set zero position.
- message_block_timeout: float¶
The timeout in seconds to wait for a Teensy ACK or a telemetry update when blocking.
- message_send_attempts: int¶
The number of attempts to send a message to the motor when awaiting a response.
- model_config: ClassVar[ConfigDict] = {'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class feathersdk.robot.actuators.ezmotion.ezmotion.EZMotionCalibrationState(*, calibrated=True, calibration_time=<factory>)¶
Bases:
PyDFrozenBaseModelThe calibration state of an EZMotion motor.
- model_config: ClassVar[ConfigDict] = {'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class feathersdk.robot.actuators.ezmotion.ezmotion.EZMotionMotorTelemetry(actuator)¶
Bases:
ActuatorTelemetry[EZMotionParamCode]Telemetry for an EZMotion motor.
- Parameters:
actuator (EZMotionMotor)
- PARAMS¶
The telemetry and write_param()/read_param() parameter codes for an EZMotion motor.
alias of
EZMotionParamCode
- class feathersdk.robot.actuators.ezmotion.ezmotion.EZMotionMotor(config, *args, **kwargs)¶
Bases:
Motor[EZMotionMotorConfig,EZMotionMotorTelemetry,EZMotionParamCode]Ezmotion motor.
- Parameters:
config (EZMotionMotorConfig)
system (ActuatorSystem)
- calibration_state = EZMotionCalibrationState(calibrated=False, calibration_time=6781.012178447)¶
The calibration state of the motor.
- go_to(position, velocity=None, acceleration=None)¶
Go to the given position in encoder counts.
- Parameters:
position (int) – The position to go to in encoder counts.
velocity (int | None) – The velocity to go to in encoder counts per second. If None, the velocity will be set to the target velocity of the motor.
acceleration (int | None) – The acceleration to go to in encoder counts per second squared. If None, the acceleration will be set to the target acceleration of the motor.
- Return type:
None
- write_param(param, value)¶
Write a parameter value to the motor.
- Parameters:
param (EZMotionParamCode)
value (int)
- Return type:
None
- read_param(param, block=True)¶
Send a request to read a parameter value from the motor.
- enable()¶
Enable the motor.
- Return type:
None
- disable()¶
Disable the motor.
- Return type:
None
- reset_faults()¶
Reset the faults for the motor and disable it.
- Return type:
None
- set_operation_mode(operation_mode)¶
Set the operation mode for the motor.
- Parameters:
operation_mode (EZMotionControlMode)
- Return type:
None
- set_target_position(target_position, transition_now=True)¶
Set the target position for this motor in encoder counts.
- set_target_velocity(target_velocity)¶
Set the target velocity for this motor in encoder counts per second.
- Parameters:
target_velocity (int)
- Return type:
None
- set_target_acceleration(target_acceleration)¶
Set the target acceleration for this motor in encoder counts per second squared.
- Parameters:
target_acceleration (int)
- Return type:
None
- set_target_deceleration(target_deceleration)¶
Set the target deceleration for this motor in encoder counts per second squared.
- Parameters:
target_deceleration (int)
- Return type:
None
- read_state()¶
Read all of the important state parameters from the motor.
- Return type:
None
- get_errors()¶
Get the errors from the motor.
- Return type: