镜像自地址
https://github.com/MINT-SJTU/Evo-RL.git
已同步 2026-11-20 18:17:06 +00:00
fix(ci): make pre-commit quality checks pass
这个提交包含在:
@ -18,7 +18,6 @@ from dataclasses import dataclass, field
|
||||
|
||||
from lerobot.cameras import CameraConfig
|
||||
|
||||
|
||||
from ..config import RobotConfig
|
||||
|
||||
|
||||
|
||||
@ -24,10 +24,10 @@ from lerobot.processor import RobotAction, RobotObservation
|
||||
from lerobot.utils.decorators import check_if_already_connected, check_if_not_connected
|
||||
from lerobot.utils.piper_sdk import (
|
||||
PIPER_ACTION_KEYS,
|
||||
guard_piper_ctrl_mode_on_connect,
|
||||
PIPER_JOINT_ACTION_KEYS,
|
||||
PIPER_JOINT_NAMES,
|
||||
get_piper_sdk,
|
||||
guard_piper_ctrl_mode_on_connect,
|
||||
milli_to_unit,
|
||||
parse_piper_log_level,
|
||||
unit_to_milli,
|
||||
@ -93,11 +93,7 @@ class PiperFollower(Robot):
|
||||
connected_cameras = []
|
||||
try:
|
||||
self.configure()
|
||||
should_auto_calibrate = (
|
||||
not self.is_calibrated
|
||||
and calibrate
|
||||
and self.config.require_calibration
|
||||
)
|
||||
should_auto_calibrate = not self.is_calibrated and calibrate and self.config.require_calibration
|
||||
if should_auto_calibrate:
|
||||
logger.info(
|
||||
"No piper-follower calibration file found for '%s'. Running lerobot-calibrate flow.",
|
||||
|
||||
@ -141,7 +141,6 @@ def setup_interface_with_fallback(interface: str, cfg: CANSetupConfig) -> tuple[
|
||||
return False, None, " | ".join(attempt_msgs)
|
||||
|
||||
|
||||
|
||||
def test_motor(bus, motor_id: int, timeout: float, use_fd: bool):
|
||||
"""Test a single motor and return responses."""
|
||||
import can
|
||||
|
||||
@ -25,10 +25,10 @@ from lerobot.processor import RobotAction
|
||||
from lerobot.utils.decorators import check_if_already_connected, check_if_not_connected
|
||||
from lerobot.utils.piper_sdk import (
|
||||
PIPER_ACTION_KEYS,
|
||||
guard_piper_ctrl_mode_on_connect,
|
||||
PIPER_JOINT_ACTION_KEYS,
|
||||
PIPER_JOINT_NAMES,
|
||||
get_piper_sdk,
|
||||
guard_piper_ctrl_mode_on_connect,
|
||||
milli_to_unit,
|
||||
parse_piper_log_level,
|
||||
unit_to_milli,
|
||||
@ -55,8 +55,8 @@ def _ensure_not_lfs_pointer(path_obj: Any, relpath: str) -> None:
|
||||
raise RuntimeError(
|
||||
"Bundled PiPER assets are still Git LFS pointer files. "
|
||||
"Please run `git lfs pull --include="
|
||||
"\"src/lerobot/assets/piper_description/**,src/lerobot/assets/piper_x_description/**\" "
|
||||
"--exclude=\"*\"` and `git lfs checkout src/lerobot/assets/piper_description "
|
||||
'"src/lerobot/assets/piper_description/**,src/lerobot/assets/piper_x_description/**" '
|
||||
'--exclude="*"` and `git lfs checkout src/lerobot/assets/piper_description '
|
||||
"src/lerobot/assets/piper_x_description`, then retry. "
|
||||
f"(file: {relpath})"
|
||||
)
|
||||
@ -109,11 +109,7 @@ class PiperLeader(Teleoperator):
|
||||
self._manual_control_enabled = None
|
||||
try:
|
||||
self.configure()
|
||||
if (
|
||||
not self.is_calibrated
|
||||
and calibrate
|
||||
and self.config.require_calibration
|
||||
):
|
||||
if not self.is_calibrated and calibrate and self.config.require_calibration:
|
||||
logger.info(
|
||||
"No piper-leader calibration file found for '%s'. Running lerobot-calibrate flow.",
|
||||
self.id,
|
||||
@ -214,7 +210,9 @@ class PiperLeader(Teleoperator):
|
||||
return
|
||||
if enabled and self._manual_control_enabled is not True:
|
||||
if not self._wait_enable(self.config.enable_timeout_s):
|
||||
logger.warning("Piper leader did not report enabled state before entering gravity compensation.")
|
||||
logger.warning(
|
||||
"Piper leader did not report enabled state before entering gravity compensation."
|
||||
)
|
||||
if self.config.sync_gripper:
|
||||
self._set_gripper_enabled(False)
|
||||
self._ensure_gravity_comp_loop().start()
|
||||
|
||||
在新工单中引用
屏蔽一个用户