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

Parse mesh from xml string. More...

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

Functions

std::vector< std::shared_ptr< tesseract::geometry::PolygonMesh > > tesseract::urdf::parseMesh (const tinyxml2::XMLElement *xml_element, const tesseract::common::ResourceLocator &locator, bool visual, bool make_convex)
 Parse xml element mesh.
 
tinyxml2::XMLElement * tesseract::urdf::writeMesh (const std::shared_ptr< const tesseract::geometry::PolygonMesh > &mesh, tinyxml2::XMLDocument &doc, const std::string &package_path, const std::string &filename)
 writeMesh Write a mesh to URDF XML and PLY file
 

Detailed Description

Parse mesh 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

◆ parseMesh()

std::vector< tesseract::geometry::PolygonMesh::Ptr > tesseract::urdf::parseMesh ( const tinyxml2::XMLElement *  xml_element,
const tesseract::common::ResourceLocator locator,
bool  visual,
bool  make_convex 
)

Parse xml element mesh.

Parameters
xml_elementThe xml element
locatorThe Tesseract resource locator
visualIndicate if visual
make_convexFlag to indicate if the mesh should be converted to a convex hull
Returns
A vector of Tesseract Meshes

◆ writeMesh()

tinyxml2::XMLElement * tesseract::urdf::writeMesh ( const std::shared_ptr< const tesseract::geometry::PolygonMesh > &  mesh,
tinyxml2::XMLDocument &  doc,
const std::string &  package_path,
const std::string &  filename 
)

writeMesh Write a mesh to URDF XML and PLY file

Parameters
meshMesh to be saved out and described in XML
docXML Document to manage generated XML
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 file location. If package_path is set, this should be relative to the package, If not, this should be an absolute path
Returns
XML element representing the mesh object in URDF format.