Skip to content

Commit

Permalink
Deprecate method
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <[email protected]>
  • Loading branch information
ahcorde committed Sep 4, 2024
1 parent 16a3916 commit 27a46da
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions python/src/gz/sim/Joint.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<math::Vector2d> &_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"),
Expand Down

0 comments on commit 27a46da

Please sign in to comment.