Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
Functions | Variables
tesseract_scene_graph_link_unit.cpp File Reference
#include <tesseract_common/macros.h>
#include <gtest/gtest.h>
#include <iostream>
#include <fstream>
#include <tesseract_geometry/geometries.h>
#include <tesseract_common/utils.h>
#include <tesseract_scene_graph/graph.h>
Include dependency graph for tesseract_scene_graph_link_unit.cpp:

Functions

Material m ("test_material")
 
 EXPECT_EQ (m.getName(), "test_material")
 
 EXPECT_TRUE (m.texture_filename.empty())
 
 EXPECT_TRUE (m.color.isApprox(Eigen::Vector4d(0.5, 0.5, 0.5, 1.0)))
 
m clear ()
 
 EXPECT_TRUE (m.origin.isApprox(Eigen::Isometry3d::Identity()))
 
 EXPECT_NEAR (m.mass, 0, 1e-6)
 
m origin translation ()
 
 EXPECT_TRUE (m.material==DEFAULT_TESSERACT_MATERIAL)
 
 EXPECT_TRUE (m.name.empty())
 
Link l ("test_link")
 
 EXPECT_EQ (l.getName(), "test_link")
 
l visual push_back (v)
 
l collision push_back (c)
 
 EXPECT_EQ (l_clone.getName(), "test_link")
 
 EXPECT_TRUE (l_clone.inertial !=l.inertial)
 
 EXPECT_TRUE (l_clone.inertial->origin.isApprox(l.inertial->origin))
 
 EXPECT_NEAR (l_clone.inertial->mass, 1, 1e-6)
 
 EXPECT_NEAR (l_clone.inertial->ixx, 5, 1e-6)
 
 EXPECT_EQ (l_clone.visual.size(), 1)
 
 EXPECT_TRUE (l_clone.visual.front() !=v)
 
 EXPECT_TRUE (l_clone.visual.front() ->origin.isApprox(l.visual.front() ->origin))
 
 EXPECT_TRUE (l_clone.visual.front() ->material==l.visual.front() ->material)
 
 EXPECT_EQ (l_clone.collision.size(), 1)
 
 EXPECT_TRUE (l_clone.collision.front() !=c)
 
 EXPECT_TRUE (l_clone.collision.front() ->origin.isApprox(l.collision.front() ->origin))
 
 EXPECT_TRUE (l_clone.collision.front() ->geometry==l.collision.front() ->geometry)
 
 EXPECT_TRUE (l.visual.empty())
 
 EXPECT_TRUE (l.collision.empty())
 
 EXPECT_TRUE (l.inertial==nullptr)
 
int main (int argc, char **argv)
 

Variables

TESSERACT_COMMON_IGNORE_WARNINGS_PUSH TESSERACT_COMMON_IGNORE_WARNINGS_POP
 
m texture_filename = "test.png"
 
m color = Eigen::Vector4d(1.0, 1.0, 1.0, 1.0)
 
Inertial m
 
m mass = 1
 
m ixx = 5
 
m ixy = 5
 
m ixz = 5
 
m iyy = 5
 
m iyz = 5
 
m izz = 5
 
m material = std::make_shared<Material>("test_material")
 
m geometry = std::make_shared<tesseract_geometry::Box>(1, 1, 1)
 
m name = "test_visual"
 
l inertial = std::make_shared<Inertial>()
 
Visual::Ptr v = std::make_shared<Visual>()
 
Collision::Ptr c = std::make_shared<Collision>()
 
Link l_clone = l.clone()
 

Function Documentation

◆ clear()

m clear ( )

◆ EXPECT_EQ() [1/5]

EXPECT_EQ ( l.  getName(),
"test_link"   
)

◆ EXPECT_EQ() [2/5]

EXPECT_EQ ( l_clone.collision.  size(),
 
)

◆ EXPECT_EQ() [3/5]

EXPECT_EQ ( l_clone.  getName(),
"test_link"   
)

◆ EXPECT_EQ() [4/5]

EXPECT_EQ ( l_clone.visual.  size(),
 
)

◆ EXPECT_EQ() [5/5]

EXPECT_EQ ( m.  getName(),
"test_material"   
)

◆ EXPECT_NEAR() [1/3]

EXPECT_NEAR ( l_clone.inertial->  ixx,
,
1e-  6 
)

◆ EXPECT_NEAR() [2/3]

EXPECT_NEAR ( l_clone.inertial->  mass,
,
1e-  6 
)

◆ EXPECT_NEAR() [3/3]

EXPECT_NEAR ( m.  mass,
,
1e-  6 
)

◆ EXPECT_TRUE() [1/16]

EXPECT_TRUE ( l.collision.  empty())

◆ EXPECT_TRUE() [2/16]

EXPECT_TRUE ( l.  inertial = =nullptr)

◆ EXPECT_TRUE() [3/16]

EXPECT_TRUE ( l.visual.  empty())

◆ EXPECT_TRUE() [4/16]

EXPECT_TRUE ( l_clone.collision.front() !  = c)

◆ EXPECT_TRUE() [5/16]

EXPECT_TRUE ( l_clone.collision.front() ->  geometry = =l.collision.front() ->geometry)

◆ EXPECT_TRUE() [6/16]

EXPECT_TRUE ( l_clone.collision.  front) ->origin.isApprox(l.collision.front() ->origin)

◆ EXPECT_TRUE() [7/16]

EXPECT_TRUE ( l_clone.inertial = l.inertial)

◆ EXPECT_TRUE() [8/16]

EXPECT_TRUE ( l_clone.inertial->origin.  isApproxl.inertial->origin)

◆ EXPECT_TRUE() [9/16]

EXPECT_TRUE ( l_clone.visual.front() !  = v)

◆ EXPECT_TRUE() [10/16]

EXPECT_TRUE ( l_clone.visual.front() ->  material = =l.visual.front() ->material)

◆ EXPECT_TRUE() [11/16]

EXPECT_TRUE ( l_clone.visual.  front) ->origin.isApprox(l.visual.front() ->origin)

◆ EXPECT_TRUE() [12/16]

EXPECT_TRUE ( m.color.  isApproxEigen::Vector4d(0.5, 0.5, 0.5, 1.0))

◆ EXPECT_TRUE() [13/16]

EXPECT_TRUE ( m.  material = =DEFAULT_TESSERACT_MATERIAL)

◆ EXPECT_TRUE() [14/16]

EXPECT_TRUE ( m.name.  empty())

◆ EXPECT_TRUE() [15/16]

EXPECT_TRUE ( m.origin.  isApproxEigen::Isometry3d::Identity())

◆ EXPECT_TRUE() [16/16]

EXPECT_TRUE ( m.texture_filename.  empty())

◆ l()

Link l ( "test_link"  )

◆ m()

Material m ( "test_material"  )

◆ main()

int main ( int  argc,
char **  argv 
)

◆ push_back() [1/2]

l collision push_back ( c  )

◆ push_back() [2/2]

l visual push_back ( v  )

◆ translation()

m origin translation ( )

Variable Documentation

◆ c

Collision::Ptr c = std::make_shared<Collision>()

◆ color

v material color = Eigen::Vector4d(1.0, 1.0, 1.0, 1.0)

◆ geometry

col geometry = std::make_shared<tesseract_geometry::Box>(1, 1, 1)

◆ inertial

l inertial = std::make_shared<Inertial>()

◆ ixx

l inertial ixx = 5

◆ ixy

l inertial ixy = 5

◆ ixz

l inertial ixz = 5

◆ iyy

l inertial iyy = 5

◆ iyz

l inertial iyz = 5

◆ izz

l inertial izz = 5

◆ l_clone

Link l_clone = l.clone()

◆ m

Collision m
Initial value:
{
using namespace tesseract_scene_graph
Definition: graph.h:82

◆ mass

l inertial mass = 1

◆ material

vis material = std::make_shared<Material>("test_material")

◆ name

col name = "test_visual"

◆ TESSERACT_COMMON_IGNORE_WARNINGS_POP

TESSERACT_COMMON_IGNORE_WARNINGS_PUSH TESSERACT_COMMON_IGNORE_WARNINGS_POP
Initial value:
{
using namespace tesseract_scene_graph

◆ texture_filename

m texture_filename = "test.png"

◆ v

Visual::Ptr v = std::make_shared<Visual>()