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

Parse visual from xml string. More...

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

Functions

std::shared_ptr< tesseract::scene_graph::Visualtesseract::urdf::parseVisual (const tinyxml2::XMLElement *xml_element, const tesseract::common::ResourceLocator &locator, std::unordered_map< std::string, std::shared_ptr< tesseract::scene_graph::Material > > &available_materials)
 Parse xml element visual.
 
tinyxml2::XMLElement * tesseract::urdf::writeVisual (const std::shared_ptr< const tesseract::scene_graph::Visual > &visual, tinyxml2::XMLDocument &doc, const std::string &package_path, const std::string &link_name, int id)
 writeVisual Write one visual geometry object to URDF XML
 

Detailed Description

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

◆ parseVisual()

std::shared_ptr< tesseract::scene_graph::Visual > tesseract::urdf::parseVisual ( const tinyxml2::XMLElement *  xml_element,
const tesseract::common::ResourceLocator locator,
std::unordered_map< std::string, std::shared_ptr< tesseract::scene_graph::Material > > &  available_materials 
)

Parse xml element visual.

Parameters
xml_elementThe xml element
locatorThe Tesseract resource locator
Returns
A Visual object

◆ writeVisual()

tinyxml2::XMLElement * tesseract::urdf::writeVisual ( const std::shared_ptr< const tesseract::scene_graph::Visual > &  visual,
tinyxml2::XMLDocument &  doc,
const std::string &  package_path,
const std::string &  link_name,
int  id = -1 
)

writeVisual Write one visual geometry object to URDF XML

Parameters
visualVisual object to be written
docXML Document to which XML will belong
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.
link_nameName of link to which collision object is attached
idIf set, this ID will be appended to the geometry name for distinguishing between multiple geometries on the same link.
Returns
An XML element representing the collision object in URDF format.