feathersdk.cli.scan_all_can_ids Module

Scan Teensy CAN buses for Robstride motors.

Every id in [0, MAX_NUM_ACTUATORS) is initialized on the Teensy, then each bus is probed with a non-blocking LIMIT_TORQUE read. A motor is present when that parameter’s telemetry timestamp moves. Pass --ids to scan only those ids instead of the full range.

class feathersdk.cli.scan_all_can_ids.CustomRobstrideActuatorSystemConfig(*, module_name='custom_robstride_actuator_system', requires_urdf=False, safe_stop_policy=SafeStopPolicy.CANNOT_ENTER_SAFE_STOP, operating_frequency=30, actuators_share_same_endpoint=True, actuators=<factory>)

Bases: ActuatorSystemConfig

Parameters:
module_name: str

The name of the actuator system.

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

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

class feathersdk.cli.scan_all_can_ids.CustomRobstrideActuatorSystem(config, *args, **kwargs)

Bases: ActuatorSystem[CustomRobstrideActuatorSystemConfig, RobstrideMotor]

Parameters:
recalibrate(allow_load=None)

Recalibrate the actuators in the system.

Parameters:

allow_load (bool | None) – If True, allow the actuator system to load calibration state from file instead of recalibrating. If None, use the per-actuator config’s allow_load_calibration value.

Return type:

None

class feathersdk.cli.scan_all_can_ids.CustomEZMotionActuatorSystemConfig(*, module_name='custom_ezmotion_actuator_system', requires_urdf=False, safe_stop_policy=SafeStopPolicy.CANNOT_ENTER_SAFE_STOP, operating_frequency=30, actuators_share_same_endpoint=True, actuators=<factory>)

Bases: ActuatorSystemConfig

Parameters:
module_name: str

The name of the actuator system.

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

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

class feathersdk.cli.scan_all_can_ids.CustomEZMotionActuatorSystem(config, *args, **kwargs)

Bases: ActuatorSystem[CustomEZMotionActuatorSystemConfig, EZMotionMotor]

Parameters:
recalibrate(allow_load=None)

Recalibrate the actuators in the system.

Parameters:

allow_load (bool | None) – If True, allow the actuator system to load calibration state from file instead of recalibrating. If None, use the per-actuator config’s allow_load_calibration value.

Return type:

None

feathersdk.cli.scan_all_can_ids.create_custom_robot(motor_type, motor_ids, config_path=None)

Create a custom robot with the given motor types.

Parameters:
  • motor_type (str)

  • motor_ids (List[int])

  • config_path (str | None)

Return type:

FeatherRobot

feathersdk.cli.scan_all_can_ids.scan_the_can(motor_types, ifaces, delay, wait_time, config_path, attempts=1, ids=None)

Scan the CAN buses for the given motor types.

Parameters:
  • motor_type – The type of motor to scan for.

  • ifaces (List[str]) – The CAN interfaces to scan on.

  • delay (float) – The delay between sending commands to the motors.

  • wait_time (float) – The time to wait for replies after a burst of commands.

  • attempts (int) – The number of attempts to make to find the motor.

  • ids (List[int] | None) – Motor ids to probe. None scans every id in [0, MAX_NUM_ACTUATORS).

  • motor_types (List[str])

  • config_path (str | None)

Returns:

A Tuple of (found, buses). found is a list of tuples of (motor_type, bus, id), and buses is a

list of all bus indices that were scanned.

Return type:

Tuple[List[Tuple[str, int, int]], List[int]]

feathersdk.cli.scan_all_can_ids.run_scancan(args)

Run a scan from already-parsed arguments (standalone or feathercli scancan).

Parameters:

args (Namespace)

Return type:

int

feathersdk.cli.scan_all_can_ids.add_arguments(parser)

Attach scancan arguments to a standalone parser or feathercli subparser.

Parameters:

parser (ArgumentParser)

Return type:

None

feathersdk.cli.scan_all_can_ids.parse_args(argv=None)
Parameters:

argv (List[str] | None)

Return type:

Namespace

feathersdk.cli.scan_all_can_ids.main(argv=None)
Parameters:

argv (List[str] | None)

Return type:

int