diff --git a/lerobot/common/motors/dynamixel.py b/lerobot/common/motors/dynamixel/dynamixel.py similarity index 100% rename from lerobot/common/motors/dynamixel.py rename to lerobot/common/motors/dynamixel/dynamixel.py diff --git a/lerobot/common/motors/dynamixel_calibration.py b/lerobot/common/motors/dynamixel/dynamixel_calibration.py similarity index 99% rename from lerobot/common/motors/dynamixel_calibration.py rename to lerobot/common/motors/dynamixel/dynamixel_calibration.py index ae4914ce..fc1e2c4a 100644 --- a/lerobot/common/motors/dynamixel_calibration.py +++ b/lerobot/common/motors/dynamixel/dynamixel_calibration.py @@ -3,7 +3,7 @@ import numpy as np -from lerobot.common.motors.dynamixel import ( +from lerobot.common.motors.dynamixel.dynamixel import ( CalibrationMode, TorqueMode, convert_degrees_to_steps, diff --git a/lerobot/common/motors/feetech.py b/lerobot/common/motors/feetech/feetech.py similarity index 100% rename from lerobot/common/motors/feetech.py rename to lerobot/common/motors/feetech/feetech.py diff --git a/lerobot/common/motors/feetech_calibration.py b/lerobot/common/motors/feetech/feetech_calibration.py similarity index 99% rename from lerobot/common/motors/feetech_calibration.py rename to lerobot/common/motors/feetech/feetech_calibration.py index 651432e0..b3ec125c 100644 --- a/lerobot/common/motors/feetech_calibration.py +++ b/lerobot/common/motors/feetech/feetech_calibration.py @@ -5,7 +5,7 @@ import time import numpy as np -from lerobot.common.motors.feetech import ( +from lerobot.common.motors.feetech.feetech import ( CalibrationMode, TorqueMode, convert_degrees_to_steps, diff --git a/lerobot/common/motors/utils.py b/lerobot/common/motors/utils.py index 8d146034..2060679c 100644 --- a/lerobot/common/motors/utils.py +++ b/lerobot/common/motors/utils.py @@ -21,12 +21,12 @@ def make_motors_buses_from_configs(motors_bus_configs: dict[str, MotorsBusConfig for key, cfg in motors_bus_configs.items(): if cfg.type == "dynamixel": - from lerobot.common.motors.dynamixel import DynamixelMotorsBus + from lerobot.common.motors.dynamixel.dynamixel import DynamixelMotorsBus motors_buses[key] = DynamixelMotorsBus(cfg) elif cfg.type == "feetech": - from lerobot.common.motors.feetech import FeetechMotorsBus + from lerobot.common.motors.feetech.feetech import FeetechMotorsBus motors_buses[key] = FeetechMotorsBus(cfg) @@ -38,13 +38,13 @@ def make_motors_buses_from_configs(motors_bus_configs: dict[str, MotorsBusConfig def make_motors_bus(motor_type: str, **kwargs) -> MotorsBus: if motor_type == "dynamixel": - from lerobot.common.motors.dynamixel import DynamixelMotorsBus + from lerobot.common.motors.dynamixel.dynamixel import DynamixelMotorsBus config = DynamixelMotorsBusConfig(**kwargs) return DynamixelMotorsBus(config) elif motor_type == "feetech": - from lerobot.common.motors.feetech import FeetechMotorsBus + from lerobot.common.motors.feetech.feetech import FeetechMotorsBus config = FeetechMotorsBusConfig(**kwargs) return FeetechMotorsBus(config)