44 int main(
int argc,
char *argv[] ) {
46 std::cout<<
"usage: "<<argv[0]<<
" <octoMap.bt>"<<std::endl;
51 OcTreeType *tree = NULL;
52 tree =
new OcTreeType(0.05);
55 tree->readBinary(argv[1]);
57 std::cout<<
"read in tree, "<<tree->getNumLeafNodes()<<
" leaves "<<std::endl;
60 tree->getMetricMin(x,y,z);
63 tree->getMetricMax(x,y,z);
67 bool unknownAsOccupied =
true;
68 unknownAsOccupied =
false;
83 p.
x() = min.
x() + 0.3 * (max.
x() - min.
x());
84 p.
y() = min.
y() + 0.6 * (max.
y() - min.
y());
85 p.
z() = min.
z() + 0.5 * (max.
z() - min.
z());
92 std::cout<<
"\n\ndistance at point "<<p.
x()<<
","<<p.
y()<<
","<<p.
z()<<
" is "<<distance<<std::endl;
94 std::cout<<
"closest obstacle to "<<p.
x()<<
","<<p.
y()<<
","<<p.
z()<<
" is at "<<closestObst.
x()<<
","<<closestObst.
y()<<
","<<closestObst.
z()<<std::endl;
void getDistanceAndClosestObstacle(const octomap::point3d &p, float &distance, octomap::point3d &closestObstacle) const
float getMaxDist() const
retrieve maximum distance value
A DynamicEDTOctomapBase object connects a DynamicEDT3D object to an octomap.
int main(int argc, char *argv[])
virtual void update(bool updateRealDist=true)