Tesseract 0.28.4
Loading...
Searching...
No Matches
octree.h File Reference

Parse octree from xml string. More...

#include <tesseract/common/macros.h>
#include <memory>
#include <string_view>
#include <tesseract/common/fwd.h>
#include <tesseract/geometry/fwd.h>

Functions

std::shared_ptr< tesseract::geometry::Octreetesseract::urdf::parseOctree (const tinyxml2::XMLElement *xml_element, const tesseract::common::ResourceLocator &locator, tesseract::geometry::OctreeSubType shape_type, bool prune)
 Parse xml element octree.
 
tinyxml2::XMLElement * tesseract::urdf::writeOctree (const std::shared_ptr< const tesseract::geometry::Octree > &octree, tinyxml2::XMLDocument &doc, const std::string &package_path, const std::string &filename)
 writeOctree Write octree out to file, and generate appropriate xml
 

Detailed Description

Parse octree from xml string.

Author
Levi Armstrong
Date
September 1, 2019
License
Software License Agreement (Apache License)
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

◆ parseOctree()

tesseract::geometry::Octree::Ptr tesseract::urdf::parseOctree ( const tinyxml2::XMLElement *  xml_element,
const tesseract::common::ResourceLocator locator,
tesseract::geometry::OctreeSubType  shape_type,
bool  prune 
)

Parse xml element octree.

Parameters
xml_elementThe xml element
locatorThe Tesseract resource locator
shape_typeThe collision/visual shape type to use
pruneIndicate if the octree should be pruned
Returns
A Tesseract Geometry Octree

◆ writeOctree()

tinyxml2::XMLElement * tesseract::urdf::writeOctree ( const std::shared_ptr< const tesseract::geometry::Octree > &  octree,
tinyxml2::XMLDocument &  doc,
const std::string &  package_path,
const std::string &  filename 
)

writeOctree Write octree out to file, and generate appropriate xml

Parameters
octreeThe geometry element containing octree data
docThe XML document to which to add the xml data
package_path/<path>/<to>/<your-package>. If set, geometry will be saved relative to the package. If not set, geometry will be saved with absolute paths.
filenameDesired filename relative to the working directory ("octree.ot" or "collision/octree.ot")
Returns
An XML element containing information on the saved file.