Skip to content

Commit 9e56326

Browse files
committed
fix python bindings
1 parent d8547d8 commit 9e56326

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

python/bindings/src/spark_dsg_bindings.cpp

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -242,11 +242,11 @@ PYBIND11_MODULE(_dsg_bindings, module) {
242242
"depth"_a = 1,
243243
"bbox_type"_a = BoundingBox::Type::AABB);
244244

245-
py::enum_<TraversabilityNodeAttributes::State>(module, "TraversabilityState")
246-
.value("UNKNOWN", TraversabilityNodeAttributes::State::UNKNOWN)
247-
.value("TRAVERSABLE", TraversabilityNodeAttributes::State::TRAVERSABLE)
248-
.value("INTRAVERSABLE", TraversabilityNodeAttributes::State::INTRAVERSABLE)
249-
.value("TRAVERSED", TraversabilityNodeAttributes::State::TRAVERSED);
245+
py::enum_<TraversabilityState>(module, "TraversabilityState")
246+
.value("UNKNOWN", TraversabilityState::UNKNOWN)
247+
.value("TRAVERSABLE", TraversabilityState::TRAVERSABLE)
248+
.value("INTRAVERSABLE", TraversabilityState::INTRAVERSABLE)
249+
.value("TRAVERSED", TraversabilityState::TRAVERSED);
250250

251251
py::class_<Metadata>(module, "_Metadata")
252252
.def(py::init<>())
@@ -445,15 +445,20 @@ PYBIND11_MODULE(_dsg_bindings, module) {
445445
.def_readwrite("deformation_connections",
446446
&Place2dNodeAttributes::deformation_connections);
447447

448-
py::class_<TraversabilityNodeAttributes::BoundaryInfo>(module, "BoundaryInfo")
448+
py::class_<BoundaryInfo>(module, "BoundaryInfo")
449449
.def(py::init<>())
450-
.def_readwrite("point", &TraversabilityNodeAttributes::BoundaryInfo::point)
451-
.def_readwrite("state", &TraversabilityNodeAttributes::BoundaryInfo::state);
450+
.def_readwrite("min", &BoundaryInfo::min)
451+
.def_readwrite("max", &BoundaryInfo::max)
452+
.def_readwrite("states", &BoundaryInfo::states);
452453

453454
py::class_<TraversabilityNodeAttributes, NodeAttributes>(
454455
module, "TraversabilityNodeAttributes")
455456
.def(py::init<>())
456457
.def_readwrite("boundary", &TraversabilityNodeAttributes::boundary)
458+
.def_readwrite("first_observed_ns",
459+
&TraversabilityNodeAttributes::first_observed_ns)
460+
.def_readwrite("last_observed_ns",
461+
&TraversabilityNodeAttributes::last_observed_ns)
457462
.def_readwrite("distance", &TraversabilityNodeAttributes::distance);
458463

459464
py::class_<AgentNodeAttributes, NodeAttributes>(module, "AgentNodeAttributes")

0 commit comments

Comments
 (0)