Esempio n. 1
0
std::ostream& OcTreePCL::writeBinary(std::ostream &s){

  // format:    treetype | resolution | num nodes | [binary nodes]

  this->toMaxLikelihood();
  this->prune();

  return writeBinaryConst(s);
}
Esempio n. 2
0
  bool AbstractOccupancyOcTree::writeBinaryConst(const std::string& filename) const{
    std::ofstream binary_outfile( filename.c_str(), std::ios_base::binary);

    if (!binary_outfile.is_open()){
      OCTOMAP_ERROR_STR("Filestream to "<< filename << " not open, nothing written.");
      return false;
    }
    writeBinaryConst(binary_outfile);
    binary_outfile.close();
    return true;
  }
Esempio n. 3
0
void OcTreePCL::writeBinaryConst(const std::string& filename) const{
  std::ofstream binary_outfile( filename.c_str(), std::ios_base::binary);

  if (!binary_outfile.is_open()){
    std::cerr << "ERROR: Filestream to "<< filename << " not open, nothing written.\n";
    return;
  } 
  else {
    writeBinaryConst(binary_outfile);
    binary_outfile.close();
  }
}
Esempio n. 4
0
 bool AbstractOccupancyOcTree::writeBinary(std::ostream &s){
   // convert to max likelihood first, this makes efficient pruning on binary data possible
   this->toMaxLikelihood();
   this->prune();
   return writeBinaryConst(s);
 }