Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
Functions | Variables
tesseract_urdf_material_unit.cpp File Reference
#include <tesseract_common/macros.h>
#include <gtest/gtest.h>
#include <Eigen/Geometry>
#include <tesseract_urdf/urdf_parser.h>
#include <tesseract_common/utils.h>
#include <tesseract_urdf/material.h>
#include "tesseract_urdf_common_unit.h"
Include dependency graph for tesseract_urdf_material_unit.cpp:

Functions

 EXPECT_TRUE (runTest< tesseract_scene_graph::Material::Ptr >(elem, &tesseract_urdf::parseMaterial, str, "material", empty_available_materials, 2, true))
 
 EXPECT_TRUE (elem->getName()=="test_material")
 
 EXPECT_TRUE (elem->color.isApprox(Eigen::Vector4d(1,.5,.5, 1), 1e-8))
 
 EXPECT_TRUE (elem->texture_filename==tesseract_common::getTempPath()+"texture.txt")
 
 EXPECT_TRUE (elem->texture_filename.empty())
 
 EXPECT_TRUE (runTest< tesseract_scene_graph::Material::Ptr >(elem, &tesseract_urdf::parseMaterial, str, "material", available_materials, 2, true))
 
 EXPECT_FALSE (runTest< tesseract_scene_graph::Material::Ptr >(elem, &tesseract_urdf::parseMaterial, str, "material", empty_available_materials, 2, true))
 
 EXPECT_FALSE (runTest< tesseract_scene_graph::Material::Ptr >(elem, &tesseract_urdf::parseMaterial, str, "material", available_materials, 2, true))
 

Variables

TESSERACT_COMMON_IGNORE_WARNINGS_PUSH TESSERACT_COMMON_IGNORE_WARNINGS_POP
 
m color = Eigen::Vector4d(1, .5, .5, 1)
 
m texture_filename = tesseract_common::getTempPath() + "texture.txt"
 
std::unordered_map< std::string, tesseract_scene_graph::Material::Ptravailable_materials
 
std::string str
 
tesseract_scene_graph::Material::Ptr elem
 

Function Documentation

◆ EXPECT_FALSE() [1/2]

EXPECT_FALSE ( runTest< tesseract_scene_graph::Material::Ptr elem, &tesseract_urdf::parseMaterial, str, "material", available_materials, 2, true)

◆ EXPECT_FALSE() [2/2]

EXPECT_FALSE ( runTest< tesseract_scene_graph::Material::Ptr elem, &tesseract_urdf::parseMaterial, str, "material", empty_available_materials, 2, true)

◆ EXPECT_TRUE() [1/6]

EXPECT_TRUE ( elem->color.  isApproxEigen::Vector4d(1,.5,.5, 1), 1e-8)

◆ EXPECT_TRUE() [2/6]

EXPECT_TRUE ( elem->  getName() = ="test_material")

◆ EXPECT_TRUE() [3/6]

EXPECT_TRUE ( elem->texture_filename.  empty())

◆ EXPECT_TRUE() [4/6]

EXPECT_TRUE ( elem->  texture_filename = =tesseract_common::getTempPath()+"texture.txt")

◆ EXPECT_TRUE() [5/6]

EXPECT_TRUE ( runTest< tesseract_scene_graph::Material::Ptr elem, &tesseract_urdf::parseMaterial, str, "material", available_materials, 2, true)

◆ EXPECT_TRUE() [6/6]

EXPECT_TRUE ( runTest< tesseract_scene_graph::Material::Ptr elem, &tesseract_urdf::parseMaterial, str, "material", empty_available_materials, 2, true)

Variable Documentation

◆ available_materials

std::unordered_map< std::string, tesseract_scene_graph::Material::Ptr > available_materials
Initial value:
{
std::unordered_map<std::string, tesseract_scene_graph::Material::Ptr> empty_available_materials

◆ color

m color = Eigen::Vector4d(1, .5, .5, 1)

◆ elem

◆ str

std::string str
Initial value:
= R"(<material name="test_material" extra="0 0 0">
<color rgba="1 .5 .5 1" extra="0 0 0"/>
<texture filename=")" +
m->texture_filename + R"("extra="0 0 0"/>
</material>)"
tesseract_kinematics::Manipulability m
Definition: kinematics_core_unit.cpp:179

◆ TESSERACT_COMMON_IGNORE_WARNINGS_POP

TESSERACT_COMMON_IGNORE_WARNINGS_PUSH TESSERACT_COMMON_IGNORE_WARNINGS_POP
Initial value:
{
auto m = std::make_shared<tesseract_scene_graph::Material>("test_material")

◆ texture_filename

m texture_filename = tesseract_common::getTempPath() + "texture.txt"