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

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

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

  return writeBinaryConst(s);
}
Exemplo 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;
  }
Exemplo 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();
  }
}
Exemplo 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);
 }