Skip to content

Commit 64530b6

Browse files
committed
fix(panda): cfg arg in constructor available in py
1 parent eee2a3a commit 64530b6

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

extensions/rcs_fr3/src/pybind/rcs.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,9 @@ PYBIND11_MODULE(_core, m) {
172172
py::class_<rcs::hw::Franka, std::shared_ptr<rcs::hw::Franka>>(hw, "Franka",
173173
robot)
174174
.def(py::init<const std::string&,
175-
std::optional<std::shared_ptr<rcs::common::Kinematics>>>(),
176-
py::arg("ip"), py::arg("ik") = std::nullopt)
175+
std::optional<std::shared_ptr<rcs::common::Kinematics>>,
176+
const std::optional<rcs::hw::FrankaConfig>&>(),
177+
py::arg("ip"), py::arg("ik") = std::nullopt, py::arg("cfg") = std::nullopt)
177178
.def("set_config", &rcs::hw::Franka::set_config, py::arg("cfg"))
178179
.def("get_config", &rcs::hw::Franka::get_config)
179180
.def("get_state", &rcs::hw::Franka::get_state)

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ class FHState(rcs._core.common.GripperState):
6464
def width(self) -> float: ...
6565

6666
class Franka(rcs._core.common.Robot):
67-
def __init__(self, ip: str, ik: rcs._core.common.Kinematics | None = None) -> None: ...
67+
def __init__(
68+
self, ip: str, ik: rcs._core.common.Kinematics | None = None, cfg: FrankaConfig | None = None
69+
) -> None: ...
6870
def automatic_error_recovery(self) -> None: ...
6971
def controller_set_joint_position(
7072
self, desired_q: numpy.ndarray[tuple[typing.Literal[7]], numpy.dtype[numpy.float64]]

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ class FHState(rcs._core.common.GripperState):
6464
def width(self) -> float: ...
6565

6666
class Franka(rcs._core.common.Robot):
67-
def __init__(self, ip: str, ik: rcs._core.common.Kinematics | None = None) -> None: ...
67+
def __init__(
68+
self, ip: str, ik: rcs._core.common.Kinematics | None = None, cfg: FrankaConfig | None = None
69+
) -> None: ...
6870
def automatic_error_recovery(self) -> None: ...
6971
def controller_set_joint_position(
7072
self, desired_q: numpy.ndarray[tuple[typing.Literal[7]], numpy.dtype[numpy.float64]]

0 commit comments

Comments
 (0)