Skip to content

Commit

Permalink
Generator::spawn()
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaschke committed May 20, 2021
1 parent a03ea5a commit c2213fc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/python/bindings/src/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ void export_core(pybind11::module& m) {
;

py::class_<InterfaceState>(m, "InterfaceState")
.def(py::init<const planning_scene::PlanningScenePtr&>(), py::arg("scene"))
.def_property_readonly("properties", py::overload_cast<>(&InterfaceState::properties), py::return_value_policy::reference_internal)
;

auto stage = properties::class_<Stage, PyStage<>>(m, "Stage")
Expand Down Expand Up @@ -178,6 +180,7 @@ void export_core(pybind11::module& m) {
.def(py::init<const std::string&>(), py::arg("name") = std::string("generator"))
.def("canCompute", &Generator::canCompute)
.def("compute", &Generator::compute)
.def("spawn", [](Generator& self, InterfaceState& state, double cost) { self.spawn(std::move(state), cost); })
;

properties::class_<MonitoringGenerator, Generator, PyMonitoringGenerator<>>(m, "MonitoringGenerator")
Expand Down

0 comments on commit c2213fc

Please sign in to comment.