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

Parse visual from xml string. More...

#include <tesseract/common/macros.h>
#include <stdexcept>
#include <Eigen/Geometry>
#include <tesseract/common/utils.h>
#include <tinyxml2.h>
#include <tesseract/urdf/visual.h>
#include <tesseract/urdf/origin.h>
#include <tesseract/urdf/material.h>
#include <tesseract/urdf/geometry.h>
#include <tesseract/scene_graph/link.h>
#include <tesseract/geometry/geometry.h>
#include <tesseract/common/resource_locator.h>

Functions

tesseract::scene_graph::Visual::Ptr tesseract::urdf::parseVisual (const tinyxml2::XMLElement *xml_element, const tesseract::common::ResourceLocator &locator, std::unordered_map< std::string, tesseract::scene_graph::Material::Ptr > &available_materials)
 
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

◆ 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.