10 unsigned int changedOccupied = 0;
11 unsigned int changedFree = 0;
12 unsigned int actualOccupied = 0;
13 unsigned int actualFree = 0;
14 unsigned int missingChanged = 0;
19 KeyBoolMap::const_iterator it;
36 for(OcTree::tree_iterator it=tree.
begin_tree(),
37 end=tree.
end_tree(); it!= end; ++it) {
48 cout <<
"change detection: " << changedOccupied <<
" occ; " << changedFree <<
" free; "<< missingChanged <<
" missing" << endl;
49 cout <<
"actual: " << actualOccupied <<
" occ; " << actualFree <<
" free; " << endl;
56 int main(
int argc,
char** argv) {
64 point3d origin (0.01f, 0.01f, 0.02f);
65 point3d point_on_surface (4.01f,0.01f,0.01f);
73 cout <<
"generating spherical scan at " << origin <<
" ..." << endl;
75 for (
int i=-100; i<101; i++) {
77 for (
int j=-100; j<101; j++) {
78 point3d rotated = point_on_surface;
90 cout <<
"done." << endl;
tree_iterator begin_tree(unsigned char maxDepth=0) const
const tree_iterator end_tree() const
virtual NODE * updateNode(const OcTreeKey &key, float log_odds_update, bool lazy_eval=false)
KeyBoolMap::const_iterator changedKeysEnd() const
Iterator to traverse all keys of changed nodes.
void push_back(float x, float y, float z)
virtual void insertPointCloud(const Pointcloud &scan, const octomap::point3d &sensor_origin, double maxrange=-1., bool lazy_eval=false, bool discretize=false)
Vector3 & rotate_IP(double roll, double pitch, double yaw)
void printChanges(OcTree &tree)
NODE * search(double x, double y, double z, unsigned int depth=0) const
virtual bool insertRay(const point3d &origin, const point3d &end, double maxrange=-1.0, bool lazy_eval=false)
int main(int argc, char **argv)
KeyBoolMap::const_iterator changedKeysBegin() const
This class represents a three-dimensional vector.
octomath::Vector3 point3d
Use Vector3 (float precision) as a point3d in octomap.
void enableChangeDetection(bool enable)
track or ignore changes while inserting scans (default: ignore)
bool isNodeOccupied(const OcTreeNode *occupancyNode) const
queries whether a node is occupied according to the tree's parameter for "occupancy" ...