Tesseract
Motion Planning Environment
|
#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>
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() |
m clear | ( | ) |
EXPECT_EQ | ( | l. | getName(), |
"test_link" | |||
) |
EXPECT_EQ | ( | l_clone.collision. | size(), |
1 | |||
) |
EXPECT_EQ | ( | l_clone. | getName(), |
"test_link" | |||
) |
EXPECT_EQ | ( | l_clone.visual. | size(), |
1 | |||
) |
EXPECT_EQ | ( | m. | getName(), |
"test_material" | |||
) |
EXPECT_NEAR | ( | l_clone.inertial-> | ixx, |
5 | , | ||
1e- | 6 | ||
) |
EXPECT_NEAR | ( | l_clone.inertial-> | mass, |
1 | , | ||
1e- | 6 | ||
) |
EXPECT_NEAR | ( | m. | mass, |
0 | , | ||
1e- | 6 | ||
) |
EXPECT_TRUE | ( | l.collision. | empty() | ) |
EXPECT_TRUE | ( | l. | inertial = =nullptr | ) |
EXPECT_TRUE | ( | l.visual. | empty() | ) |
EXPECT_TRUE | ( | l_clone.collision.front() ! | = c | ) |
EXPECT_TRUE | ( | l_clone.collision.front() -> | geometry = =l.collision.front() ->geometry | ) |
EXPECT_TRUE | ( | l_clone.collision. | front) ->origin.isApprox(l.collision.front() ->origin | ) |
EXPECT_TRUE | ( | l_clone.inertial ! | = l.inertial | ) |
EXPECT_TRUE | ( | l_clone.inertial->origin. | isApproxl.inertial->origin | ) |
EXPECT_TRUE | ( | l_clone.visual.front() ! | = v | ) |
EXPECT_TRUE | ( | l_clone.visual.front() -> | material = =l.visual.front() ->material | ) |
EXPECT_TRUE | ( | l_clone.visual. | front) ->origin.isApprox(l.visual.front() ->origin | ) |
EXPECT_TRUE | ( | m.color. | isApproxEigen::Vector4d(0.5, 0.5, 0.5, 1.0) | ) |
EXPECT_TRUE | ( | m. | material = =DEFAULT_TESSERACT_MATERIAL | ) |
EXPECT_TRUE | ( | m.name. | empty() | ) |
EXPECT_TRUE | ( | m.origin. | isApproxEigen::Isometry3d::Identity() | ) |
EXPECT_TRUE | ( | m.texture_filename. | empty() | ) |
Link l | ( | "test_link" | ) |
Material m | ( | "test_material" | ) |
int main | ( | int | argc, |
char ** | argv | ||
) |
m origin translation | ( | ) |
Collision::Ptr c = std::make_shared<Collision>() |
col geometry = std::make_shared<tesseract_geometry::Box>(1, 1, 1) |
l inertial = std::make_shared<Inertial>() |
Link l_clone = l.clone() |
Collision m |
vis material = std::make_shared<Material>("test_material") |
col name = "test_visual" |
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH TESSERACT_COMMON_IGNORE_WARNINGS_POP |
m texture_filename = "test.png" |
Visual::Ptr v = std::make_shared<Visual>() |