Skip to content

Commit

Permalink
anti-frontiers
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldenZephyr committed Jul 22, 2024
1 parent afa8959 commit 81b34fd
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.14)
project(spark_dsg VERSION 1.0.4)
project(spark_dsg VERSION 1.0.5)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
Expand Down
1 change: 1 addition & 0 deletions include/spark_dsg/node_attributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ struct PlaceNodeAttributes : public SemanticNodeAttributes {
bool real_place = true;
bool need_cleanup = false;
bool active_frontier = false;
bool anti_frontier = false;
Eigen::Vector3d frontier_scale;
Eigen::Quaterniond orientation;
size_t num_frontier_voxels = 0;
Expand Down
1 change: 1 addition & 0 deletions python/bindings/src/bounding_box.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
* -------------------------------------------------------------------------- */
#include "spark_dsg/python/bounding_box.h"

#include <pybind11/stl.h>
#include <pybind11/eigen.h>
#include <pybind11/pybind11.h>
#include <spark_dsg/bounding_box.h>
Expand Down
1 change: 1 addition & 0 deletions python/bindings/src/node_attributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ void addBindings(pybind11::module_& module) {
&PlaceNodeAttributes::deformation_connections)
.def_readwrite("real_place", &PlaceNodeAttributes::real_place)
.def_readwrite("active_frontier", &PlaceNodeAttributes::active_frontier)
.def_readwrite("anti_frontier", &PlaceNodeAttributes::anti_frontier)
.def_readwrite("frontier_scale", &PlaceNodeAttributes::frontier_scale)
.def_property(
"orientation",
Expand Down
9 changes: 9 additions & 0 deletions src/node_attributes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ std::ostream& PlaceNodeAttributes::fill_ostream(std::ostream& out) const {
out << std::boolalpha << "\n - real place: " << real_place;
out << std::boolalpha << "\n - need cleanup: " << need_cleanup;
out << std::boolalpha << "\n - active frontier: " << active_frontier;
out << std::boolalpha << "\n - anti frontier: " << anti_frontier;
out << "\n - num frontier voxels: " << num_frontier_voxels;
return out;
}
Expand All @@ -313,6 +314,13 @@ void PlaceNodeAttributes::serialization_info() {
serialization::field("orientation", orientation);
serialization::field("need_cleanup", need_cleanup);
serialization::field("num_frontier_voxels", num_frontier_voxels);

const auto& header = io::GlobalInfo::loadedHeader();
if (header.version < io::Version(1, 0, 5)) {
io::warnOutdatedHeader(header);
} else {
serialization::field("anti_frontier", anti_frontier);
}
}

bool PlaceNodeAttributes::is_equal(const NodeAttributes& other) const {
Expand All @@ -333,6 +341,7 @@ bool PlaceNodeAttributes::is_equal(const NodeAttributes& other) const {
deformation_connections == derived->deformation_connections &&
real_place == derived->real_place &&
active_frontier == derived->active_frontier &&
anti_frontier == derived->anti_frontier &&
frontier_scale == derived->frontier_scale &&
quaternionsEqual(orientation, derived->orientation) &&
need_cleanup == derived->need_cleanup &&
Expand Down

0 comments on commit 81b34fd

Please sign in to comment.