feathersdk.robot.actuators.robstride.calibrate Module¶
- exception feathersdk.robot.actuators.robstride.calibrate.RobstrideCalibrationError¶
Bases:
ExceptionRaised when a calibration error occurs.
- class feathersdk.robot.actuators.robstride.calibrate.RobstrideCalibrationState(*, calibrated=True, calibrated_angle_range=NumericRange(min=-6.283185307179586, max=6.283185307179586), homing_offset=0, calibration_time=<factory>)¶
Bases:
PyDFrozenBaseModelThe calibration state of a robstride motor.
- Parameters:
- calibrated_angle_range: NumericRange¶
The true calibrated angle range of the motor. Accounts for slight variations in hard stop distances.
- homing_offset: float¶
if the motor is physically at homing_offset radians, then we consider it to be at 0 radians.
- Type:
The offset to add to our position commands when sending to the motor. IE
- model_config: ClassVar[ConfigDict] = {'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class feathersdk.robot.actuators.robstride.calibrate.RobstrideCalibrationConfig(*, speed, torque_threshold, num_tries=2, torque_limit_timeout=30.0, step_time=0.02, fast_find_speed_mult=1.0, abs_range_tolerance=0.03490658503988659, homing_tolerance_rads=0.01, operating_frequency=100.0, manual_offset=0, freeze_on_failed_calibration=False, allow_load_calibration=False)¶
Bases:
PyDFrozenBaseModelConfig for finding the limits of a actuator.
- Parameters:
speed (float)
torque_threshold (float)
num_tries (int)
torque_limit_timeout (float)
step_time (float)
fast_find_speed_mult (float)
abs_range_tolerance (float)
homing_tolerance_rads (float)
operating_frequency (float)
manual_offset (float)
freeze_on_failed_calibration (bool)
allow_load_calibration (bool)
- torque_limit_timeout: float¶
The timeout in seconds to wait for the motor to reach the torque limit.
- step_time: float¶
Every this much time in seconds, we read the torque and angle and check if the limit is reached.
- fast_find_speed_mult: float¶
After finding the first limit, we can move faster for most of the expected distance until other limit to speed up calibration. We start at speed * fast_find_speed_mult then decrease to speed by 80% of expected distance
- model_config: ClassVar[ConfigDict] = {'frozen': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- abs_range_tolerance: float¶
Max absolute difference between the expected range and the found range to be considered valid.
- homing_tolerance_rads: float¶
Tolerance for the motor to be considered homed. Radians above and below to allow
- manual_offset: float¶
A manual offset to add to the homing position in radians. This can be used if the hard stops asymmetric enough that we need to manually shift the offset to be in the desired position.
- feathersdk.robot.actuators.robstride.calibrate.calibrate_robstride_motor(motor, home=True)¶
Calibrate a robstride motor.
- Parameters:
motor (RobstrideMotor)
home (bool)
- Return type:
None