Rename SO-100 classes
This commit is contained in:
@@ -1,4 +1,2 @@
|
||||
from .configuration_so100 import SO100TeleopConfig
|
||||
from .teleop_so100 import SO100Teleop
|
||||
|
||||
__all__ = ["SO100TeleopConfig", "SO100Teleop"]
|
||||
from .config_so100_leader import SO100LeaderConfig
|
||||
from .so100_leader import SO100Leader
|
||||
|
||||
@@ -19,8 +19,8 @@ from dataclasses import dataclass
|
||||
from ..config import TeleoperatorConfig
|
||||
|
||||
|
||||
@TeleoperatorConfig.register_subclass("so100")
|
||||
@TeleoperatorConfig.register_subclass("so100_leader")
|
||||
@dataclass
|
||||
class SO100TeleopConfig(TeleoperatorConfig):
|
||||
# Port to connect to the teloperator
|
||||
class SO100LeaderConfig(TeleoperatorConfig):
|
||||
# Port to connect to the arm
|
||||
port: str
|
||||
@@ -25,20 +25,20 @@ from lerobot.common.motors.feetech import (
|
||||
)
|
||||
|
||||
from ..teleoperator import Teleoperator
|
||||
from .configuration_so100 import SO100TeleopConfig
|
||||
from .config_so100_leader import SO100LeaderConfig
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class SO100Teleop(Teleoperator):
|
||||
class SO100Leader(Teleoperator):
|
||||
"""
|
||||
[SO-100 Leader Arm](https://github.com/TheRobotStudio/SO-ARM100) designed by TheRobotStudio
|
||||
"""
|
||||
|
||||
config_class = SO100TeleopConfig
|
||||
name = "so100"
|
||||
config_class = SO100LeaderConfig
|
||||
name = "so100_leader"
|
||||
|
||||
def __init__(self, config: SO100TeleopConfig):
|
||||
def __init__(self, config: SO100LeaderConfig):
|
||||
super().__init__(config)
|
||||
self.config = config
|
||||
self.arm = FeetechMotorsBus(
|
||||
@@ -136,9 +136,7 @@ class SO100Teleop(Teleoperator):
|
||||
|
||||
def disconnect(self) -> None:
|
||||
if not self.is_connected:
|
||||
raise DeviceNotConnectedError(
|
||||
"ManipulatorRobot is not connected. You need to run `robot.connect()` before disconnecting."
|
||||
)
|
||||
DeviceNotConnectedError(f"{self} is not connected.")
|
||||
|
||||
self.arm.disconnect()
|
||||
logger.info(f"{self} disconnected.")
|
||||
Reference in New Issue
Block a user