Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ign -> gz : Fix Python bindings #1606

Merged
merged 1 commit into from
Jul 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/src/gz/sim/EntityComponentManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace sim
namespace python
{
/////////////////////////////////////////////////
void defineGazeboEntityComponentManager(pybind11::object module)
void defineSimEntityComponentManager(pybind11::object module)
{
pybind11::class_<gz::sim::EntityComponentManager>(
module, "EntityComponentManager")
Expand Down
2 changes: 1 addition & 1 deletion python/src/gz/sim/EntityComponentManager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace python
* \param[in] module a pybind11 module to add the definition to
*/
void
defineGazeboEntityComponentManager(pybind11::object module);
defineSimEntityComponentManager(pybind11::object module);
} // namespace python
} // namespace sim
} // namespace gz
Expand Down
2 changes: 1 addition & 1 deletion python/src/gz/sim/EventManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace sim
namespace python
{
/////////////////////////////////////////////////
void defineGazeboEventManager(pybind11::object module)
void defineSimEventManager(pybind11::object module)
{
pybind11::class_<gz::sim::EventManager>(module, "EventManager")
.def(pybind11::init<>());
Expand Down
2 changes: 1 addition & 1 deletion python/src/gz/sim/EventManager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace python
* \param[in] module a pybind11 module to add the definition to
*/
void
defineGazeboEventManager(pybind11::object module);
defineSimEventManager(pybind11::object module);
} // namespace python
} // namespace sim
} // namespace gz
Expand Down
2 changes: 1 addition & 1 deletion python/src/gz/sim/TestFixture.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace sim
namespace python
{
void
defineGazeboTestFixture(pybind11::object module)
defineSimTestFixture(pybind11::object module)
{
pybind11::class_<TestFixture, std::shared_ptr<TestFixture>> testFixture(module, "TestFixture");

Expand Down
2 changes: 1 addition & 1 deletion python/src/gz/sim/TestFixture.hh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace python
* \param[in] module a pybind11 module to add the definition to
*/
void
defineGazeboTestFixture(pybind11::object module);
defineSimTestFixture(pybind11::object module);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion python/src/gz/sim/UpdateInfo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace sim
{
namespace python
{
void defineGazeboUpdateInfo(pybind11::object module)
void defineSimUpdateInfo(pybind11::object module)
{
pybind11::class_<gz::sim::UpdateInfo>(module, "UpdateInfo")
.def(pybind11::init<>())
Expand Down
2 changes: 1 addition & 1 deletion python/src/gz/sim/UpdateInfo.hh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace python
* \param[in] module a pybind11 module to add the definition to
*/
void
defineGazeboUpdateInfo(pybind11::object module);
defineSimUpdateInfo(pybind11::object module);
} // namespace python
} // namespace sim
} // namespace gz
Expand Down
2 changes: 1 addition & 1 deletion python/src/gz/sim/Util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace sim
{
namespace python
{
void defineGazeboUtil(pybind11::module &_module)
void defineSimUtil(pybind11::module &_module)
{
_module.def("world_entity",
pybind11::overload_cast<const EntityComponentManager &>(
Expand Down
2 changes: 1 addition & 1 deletion python/src/gz/sim/Util.hh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace python
{
/// Define a pybind11 wrapper for a gz::sim::Util
/// \param[in] _module a pybind11 module to add the definition to
void defineGazeboUtil(pybind11::module &_module);
void defineSimUtil(pybind11::module &_module);
} // namespace python
} // namespace sim
} // namespace gz
Expand Down
2 changes: 1 addition & 1 deletion python/src/gz/sim/World.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace sim
{
namespace python
{
void defineGazeboWorld(pybind11::object module)
void defineSimWorld(pybind11::object module)
{
pybind11::class_<gz::sim::World>(module, "World")
.def(pybind11::init<gz::sim::Entity>())
Expand Down
2 changes: 1 addition & 1 deletion python/src/gz/sim/World.hh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace python
* \param[in] module a pybind11 module to add the definition to
*/
void
defineGazeboWorld(pybind11::object module);
defineSimWorld(pybind11::object module);
} // namespace python
} // namespace sim
} // namespace gz
Expand Down
29 changes: 21 additions & 8 deletions python/src/gz/sim/_gz_sim_pybind11.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,28 @@
#include "Util.hh"
#include "World.hh"

PYBIND11_MODULE(gazebo, m) {
m.doc() = "Gazebo Python Library.";
PYBIND11_MODULE(sim, m) {
m.doc() = "Gazebo Sim Python Library.";

gz::sim::python::defineGazeboEntityComponentManager(m);
gz::sim::python::defineGazeboEventManager(m);
gz::sim::python::defineSimEntityComponentManager(m);
gz::sim::python::defineSimEventManager(m);
gz::sim::python::defineSimServer(m);
gz::sim::python::defineSimServerConfig(m);
gz::sim::python::defineGazeboTestFixture(m);
gz::sim::python::defineGazeboUpdateInfo(m);
gz::sim::python::defineGazeboWorld(m);
gz::sim::python::defineGazeboUtil(m);
gz::sim::python::defineSimTestFixture(m);
gz::sim::python::defineSimUpdateInfo(m);
gz::sim::python::defineSimWorld(m);
gz::sim::python::defineSimUtil(m);
}

PYBIND11_MODULE(gazebo, m) { // TODO(CH3): Deprecated. Remove on tock.
m.doc() = "Gazebo Sim Python Library.";

gz::sim::python::defineSimEntityComponentManager(m);
gz::sim::python::defineSimEventManager(m);
gz::sim::python::defineSimServer(m);
gz::sim::python::defineSimServerConfig(m);
gz::sim::python::defineSimTestFixture(m);
gz::sim::python::defineSimUpdateInfo(m);
gz::sim::python::defineSimWorld(m);
gz::sim::python::defineSimUtil(m);
}