From 2885d295442c9b134b1b1e26a6543c7e8293f84f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20J=C3=BClg?= Date: Tue, 11 Nov 2025 18:00:57 +0100 Subject: [PATCH] fix(extensions): missing franka config constructor --- extensions/rcs_fr3/src/pybind/rcs.cpp | 6 ++++-- extensions/rcs_fr3/src/rcs_fr3/_core/hw/__init__.pyi | 4 ++-- extensions/rcs_fr3/src/rcs_fr3/creators.py | 1 + extensions/rcs_panda/src/rcs_panda/_core/hw/__init__.pyi | 4 ++-- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/extensions/rcs_fr3/src/pybind/rcs.cpp b/extensions/rcs_fr3/src/pybind/rcs.cpp index 492c9b3d..3c26a10d 100644 --- a/extensions/rcs_fr3/src/pybind/rcs.cpp +++ b/extensions/rcs_fr3/src/pybind/rcs.cpp @@ -68,8 +68,10 @@ PYBIND11_MODULE(_core, m) { .def_readwrite("world_to_robot", &rcs::hw::FrankaConfig::world_to_robot) .def_readwrite("async_control", &rcs::hw::FrankaConfig::async_control); - py::class_(hw, "FR3Config"); - py::class_(hw, "PandaConfig"); + py::class_(hw, "FR3Config") + .def(py::init<>()); + py::class_(hw, "PandaConfig") + .def(py::init<>()); py::object gripper_config = (py::object)py::module_::import("rcs").attr("common").attr( diff --git a/extensions/rcs_fr3/src/rcs_fr3/_core/hw/__init__.pyi b/extensions/rcs_fr3/src/rcs_fr3/_core/hw/__init__.pyi index 263e07c3..a5ac62c8 100644 --- a/extensions/rcs_fr3/src/rcs_fr3/_core/hw/__init__.pyi +++ b/extensions/rcs_fr3/src/rcs_fr3/_core/hw/__init__.pyi @@ -143,10 +143,10 @@ class IKSolver: def value(self) -> int: ... class FR3Config(FrankaConfig): - pass + def __init__(self) -> None: ... class PandaConfig(FrankaConfig): - pass + def __init__(self) -> None: ... franka_ik: IKSolver # value = rcs_ik: IKSolver # value = diff --git a/extensions/rcs_fr3/src/rcs_fr3/creators.py b/extensions/rcs_fr3/src/rcs_fr3/creators.py index d9589ca2..0683256c 100644 --- a/extensions/rcs_fr3/src/rcs_fr3/creators.py +++ b/extensions/rcs_fr3/src/rcs_fr3/creators.py @@ -104,6 +104,7 @@ def __call__( # type: ignore class RCSFR3MultiEnvCreator(RCSHardwareEnvCreator): def __call__( # type: ignore + self, name2ip: dict[str, str], control_mode: ControlMode, robot_cfg: hw.FR3Config, diff --git a/extensions/rcs_panda/src/rcs_panda/_core/hw/__init__.pyi b/extensions/rcs_panda/src/rcs_panda/_core/hw/__init__.pyi index 263e07c3..a5ac62c8 100644 --- a/extensions/rcs_panda/src/rcs_panda/_core/hw/__init__.pyi +++ b/extensions/rcs_panda/src/rcs_panda/_core/hw/__init__.pyi @@ -143,10 +143,10 @@ class IKSolver: def value(self) -> int: ... class FR3Config(FrankaConfig): - pass + def __init__(self) -> None: ... class PandaConfig(FrankaConfig): - pass + def __init__(self) -> None: ... franka_ik: IKSolver # value = rcs_ik: IKSolver # value =