Skip to content

Commit 5828820

Browse files
authored
fix(extensions): missing franka config constructor (#227)
- missing constructors in derived franka config classes - missing `self` argument in fr3 multi robot env
1 parent d37d804 commit 5828820

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

extensions/rcs_fr3/src/pybind/rcs.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ PYBIND11_MODULE(_core, m) {
6868
.def_readwrite("world_to_robot", &rcs::hw::FrankaConfig::world_to_robot)
6969
.def_readwrite("async_control", &rcs::hw::FrankaConfig::async_control);
7070

71-
py::class_<rcs::hw::FR3Config, rcs::hw::FrankaConfig>(hw, "FR3Config");
72-
py::class_<rcs::hw::PandaConfig, rcs::hw::FrankaConfig>(hw, "PandaConfig");
71+
py::class_<rcs::hw::FR3Config, rcs::hw::FrankaConfig>(hw, "FR3Config")
72+
.def(py::init<>());
73+
py::class_<rcs::hw::PandaConfig, rcs::hw::FrankaConfig>(hw, "PandaConfig")
74+
.def(py::init<>());
7375

7476
py::object gripper_config =
7577
(py::object)py::module_::import("rcs").attr("common").attr(

extensions/rcs_fr3/src/rcs_fr3/_core/hw/__init__.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@ class IKSolver:
143143
def value(self) -> int: ...
144144

145145
class FR3Config(FrankaConfig):
146-
pass
146+
def __init__(self) -> None: ...
147147

148148
class PandaConfig(FrankaConfig):
149-
pass
149+
def __init__(self) -> None: ...
150150

151151
franka_ik: IKSolver # value = <IKSolver.franka_ik: 0>
152152
rcs_ik: IKSolver # value = <IKSolver.rcs_ik: 1>

extensions/rcs_fr3/src/rcs_fr3/creators.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ def __call__( # type: ignore
104104

105105
class RCSFR3MultiEnvCreator(RCSHardwareEnvCreator):
106106
def __call__( # type: ignore
107+
self,
107108
name2ip: dict[str, str],
108109
control_mode: ControlMode,
109110
robot_cfg: hw.FR3Config,

extensions/rcs_panda/src/rcs_panda/_core/hw/__init__.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@ class IKSolver:
143143
def value(self) -> int: ...
144144

145145
class FR3Config(FrankaConfig):
146-
pass
146+
def __init__(self) -> None: ...
147147

148148
class PandaConfig(FrankaConfig):
149-
pass
149+
def __init__(self) -> None: ...
150150

151151
franka_ik: IKSolver # value = <IKSolver.franka_ik: 0>
152152
rcs_ik: IKSolver # value = <IKSolver.rcs_ik: 1>

0 commit comments

Comments
 (0)