feathersdk.robot.actuators.actuator Module¶
- class feathersdk.robot.actuators.actuator.ActuatorConfig(*, name, id, endpoint='', shares_endpoint_with=None, requires_calibration, calibration_timeout=10.0)¶
Bases:
PyDFrozenBaseModelFrozen base class for all actuator configs.
- Parameters:
Name of an actuator or multiple actuators that share the same endpoint with this actuator. If set, we will probe for this actuator’s endpoint after all other actuators have been found. We check only endpoints of existing actuator names in this list. If no actuators in this list exist, we probe as normal. Otherwise, the endpoint for this actuator must be the same as the first shared actuator found in the list. This is useful for speeding up actuator endpoint detection, especially for slow-detecting actuators like the EZMotion motors.
- set_endpoint(endpoint)¶
Set the communication endpoint for the motor.
- Parameters:
endpoint (str)
- Return type:
None
- clear_endpoint()¶
Clear the communication endpoint for the motor.
- Return type:
None
- model_config: ClassVar[ConfigDict] = {'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class feathersdk.robot.actuators.actuator.TActuatorConfig¶
Typevar bound to ActuatorConfig
alias of TypeVar(‘TActuatorConfig’, bound=
ActuatorConfig)
- class feathersdk.robot.actuators.actuator.ComplianceModeConfig(*, compliance_mode_torque_threshold, compliance_mode_update_dx, compliance_mode_max_velocity, compliance_mode_max_acceleration)¶
Bases:
PyDFrozenBaseModelFrozen base class for all compliance mode configs for actuators that can enter compliance mode.
- Parameters:
- compliance_mode_torque_threshold: float¶
The torque threshold for compliance mode in Newtons-meters.
- compliance_mode_update_dx: float¶
The update change in position for compliance mode. Might have different units depending on the actuator.
- compliance_mode_max_velocity: float¶
The maximum velocity for compliance mode. Might have different units depending on the actuator.
- compliance_mode_max_acceleration: float¶
The maximum acceleration for compliance mode. Might have different units depending on the actuator.
- model_config: ClassVar[ConfigDict] = {'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class feathersdk.robot.actuators.actuator.TComplianceModeConfig¶
Typevar bound to ComplianceModeConfig
alias of TypeVar(‘TComplianceModeConfig’, bound=
ComplianceModeConfig)
- class feathersdk.robot.actuators.actuator.SafeStopPolicy(value)¶
Bases:
UniqueEnum- CANNOT_ENTER_SAFE_STOP = -1¶
Disable safe stop for the actuator system.
- DO_NOTHING = 0¶
Do nothing when encountering a dangerous state.
- DISABLE_ACTUATORS = 1¶
Call disable() on all actuators in the system when encountering a dangerous state.
- COMPLIANCE_MODE = 2¶
Enter compliance mode for all actuators in the system when encountering a dangerous state.
- class feathersdk.robot.actuators.actuator.Actuator(config, *args, **kwargs)¶
Bases:
Configurable[TActuatorConfig],ABC,Generic[TActuatorConfig]Base class for all actuators.
- Parameters:
config (TActuatorConfig)
system (Optional[ActuatorSystem[TActuatorSystemConfig]])
- comms: Type[_CommsManager]¶
The comms manager for the actuator. Handles all low-level communication with the actuator.
- system: ActuatorSystem[TActuatorSystemConfig] | None¶
The actuator system that this actuator belongs to.
- trigger_safe_stop()¶
Trigger safe stop for the actuator system that this actuator belongs to.
- Return type:
None
- exception feathersdk.robot.actuators.actuator.ActuatorCalibrationError¶
Bases:
ExceptionRaised when an error occurs during actuator calibration.
- feathersdk.robot.actuators.actuator.calibrate_actuator_group(actuators, allow_load=False, only_load=False, home=True, multithreaded=True)¶
Recalibrate a group of actuators.
- Parameters:
actuators (List[Actuator[TActuatorConfig]]) – The list of actuators to calibrate.
allow_load (bool) – If True, allow the actuators to load calibration state from file instead of recalibrating.
only_load (bool) – If True, only load calibration state from file, do not recalibrate. allow_load must be True.
home (bool) – If True, home the actuators after calibration.
multithreaded (bool) – If True, calibrate the actuators all at once in multiple threads. Otherwise, one at a time.
- Return type:
None