From 27a46daeeef890f949514b88b086daf3eb8312ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Wed, 4 Sep 2024 17:30:49 +0200 Subject: [PATCH] Deprecate method MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alejandro Hernández Cordero --- python/src/gz/sim/Joint.cc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/python/src/gz/sim/Joint.cc b/python/src/gz/sim/Joint.cc index 88c8f95860..328e4d51cf 100644 --- a/python/src/gz/sim/Joint.cc +++ b/python/src/gz/sim/Joint.cc @@ -94,6 +94,21 @@ void defineSimJoint(py::object module) py::arg("ecm"), py::arg("limits"), "Set the effort limits on a joint axis.") + .def("set_position_imits", + [](pybind11::object &self, EntityComponentManager &_ecm, + const std::vector &_limits) + { + auto warnings = pybind11::module::import("warnings"); + auto builtins = pybind11::module::import("builtins"); + warnings.attr("warn")( + "set_position_imits() is deprecated, use set_position_limits() instead.", + builtins.attr("DeprecationWarning")); + + return self.attr("set_position_limits")(_ecm, _limits); + }, + py::arg("ecm"), + py::arg("limits"), + "Set the position limits on a joint axis.") .def("set_position_limits", &gz::sim::Joint::SetPositionLimits, py::arg("ecm"), py::arg("limits"),