Reorder arguments of Simulate::Load in Python to match C++.
PiperOrigin-RevId: 523973129 Change-Id: I58760e3e392a208dd8257c340da146aa8f745fb7
This commit is contained in:
committed by
Copybara-Service
parent
5646c905cd
commit
cefc290eac
@@ -51,13 +51,13 @@ PYBIND11_MODULE(_simulate, pymodule) {
|
|||||||
std::make_unique<mujoco::GlfwAdapter>());
|
std::make_unique<mujoco::GlfwAdapter>());
|
||||||
}))
|
}))
|
||||||
.def(
|
.def(
|
||||||
"renderloop",
|
"render_loop",
|
||||||
[](mujoco::Simulate& simulate) { simulate.RenderLoop(); },
|
[](mujoco::Simulate& simulate) { simulate.RenderLoop(); },
|
||||||
py::call_guard<py::gil_scoped_release>())
|
py::call_guard<py::gil_scoped_release>())
|
||||||
.def(
|
.def(
|
||||||
"load",
|
"load",
|
||||||
[](mujoco::Simulate& simulate, const std::string& path,
|
[](mujoco::Simulate& simulate, MjModelWrapper& m, MjDataWrapper& d,
|
||||||
MjModelWrapper& m, MjDataWrapper& d) {
|
const std::string& path) {
|
||||||
simulate.Load(m.get(), d.get(), path.c_str());
|
simulate.Load(m.get(), d.get(), path.c_str());
|
||||||
},
|
},
|
||||||
py::call_guard<py::gil_scoped_release>())
|
py::call_guard<py::gil_scoped_release>())
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ def _launch_internal(model: Optional[mujoco.MjModel] = None,
|
|||||||
atexit.register(exit_requester)
|
atexit.register(exit_requester)
|
||||||
|
|
||||||
side_thread.start()
|
side_thread.start()
|
||||||
simulate.renderloop()
|
simulate.render_loop()
|
||||||
atexit.unregister(exit_requester)
|
atexit.unregister(exit_requester)
|
||||||
side_thread.join()
|
side_thread.join()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user