Tesseract
Motion Planning Environment
|
#include <tesseract_common/macros.h>
#include <gtest/gtest.h>
#include <algorithm>
#include <memory>
#include <octomap/octomap.h>
#include <tesseract_geometry/geometries.h>
#include <tesseract_geometry/mesh_parser.h>
Classes | |
struct | TestPointCloud |
struct | TestPointCloud::point |
Typedefs | |
using | T = tesseract_geometry::PolygonMesh |
Functions | |
EXPECT_NEAR (geom->getX(), 1, 1e-5) | |
EXPECT_NEAR (std::static_pointer_cast< T >(geom_clone) ->getX(), 1, 1e-5) | |
EXPECT_NEAR (std::static_pointer_cast< T >(geom_clone) ->getY(), 1, 1e-5) | |
EXPECT_NEAR (std::static_pointer_cast< T >(geom_clone) ->getZ(), 1, 1e-5) | |
EXPECT_NEAR (std::static_pointer_cast< T >(geom_clone) ->getRadius(), 1, 1e-5) | |
EXPECT_NEAR (std::static_pointer_cast< T >(geom_clone) ->getLength(), 1, 1e-5) | |
EXPECT_NEAR (std::static_pointer_cast< T >(geom_clone) ->getA(), 1, 1e-5) | |
EXPECT_NEAR (std::static_pointer_cast< T >(geom_clone) ->getB(), 1, 1e-5) | |
EXPECT_NEAR (std::static_pointer_cast< T >(geom_clone) ->getC(), 1, 1e-5) | |
EXPECT_NEAR (std::static_pointer_cast< T >(geom_clone) ->getD(), 1, 1e-5) | |
vertices | emplace_back (1, 1, 0) |
vertices | emplace_back (1, -1, 0) |
vertices | emplace_back (-1, -1, 0) |
faces | resize (5) |
EXPECT_TRUE (geom->getVertices() !=nullptr) | |
EXPECT_TRUE (geom->getFaces() !=nullptr) | |
EXPECT_TRUE (geom->getVertexCount()==4) | |
EXPECT_TRUE (std::static_pointer_cast< T >(geom_clone) ->getVertices() !=nullptr) | |
EXPECT_TRUE (std::static_pointer_cast< T >(geom_clone) ->getFaces() !=nullptr) | |
EXPECT_TRUE (std::static_pointer_cast< T >(geom_clone) ->getVertexCount()==4) | |
EXPECT_TRUE (std::static_pointer_cast< T >(geom_clone) ->getFaceCount()==1) | |
faces | resize (8) |
EXPECT_TRUE (std::static_pointer_cast< T >(geom_clone) ->getMaterial()==nullptr) | |
EXPECT_TRUE (geom->getMaterial() !=nullptr) | |
EXPECT_TRUE (std::static_pointer_cast< T >(geom_clone) ->getMaterial() !=nullptr) | |
EXPECT_TRUE (geom->getOctree() !=nullptr) | |
EXPECT_TRUE (std::static_pointer_cast< T >(geom_clone) ->getOctree() !=nullptr) | |
EXPECT_TRUE (std::static_pointer_cast< T >(geom_clone) ->getSubType()==tesseract_geometry::Octree::SubType::BOX) | |
EXPECT_TRUE (meshes.size()==1) | |
EXPECT_TRUE (meshes[0]->getFaceCount()==80) | |
EXPECT_TRUE (meshes[1]->getFaceCount()==80) | |
EXPECT_TRUE (convex_meshes.size()==1) | |
EXPECT_TRUE (convex_meshes[0]->getFaceCount()==6) | |
int | main (int argc, char **argv) |
Variables | |
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH | TESSERACT_COMMON_IGNORE_WARNINGS_POP |
std::shared_ptr< const Eigen::VectorXi > | faces = std::make_shared<const Eigen::VectorXi>() |
auto | box = std::make_shared<tesseract_geometry::Box>(1, 1, 1) |
auto | cone = std::make_shared<tesseract_geometry::Cone>(1, 1) |
auto | cylinder = std::make_shared<tesseract_geometry::Cylinder>(1, 1) |
auto | capsule = std::make_shared<tesseract_geometry::Capsule>(1, 1) |
auto | plane = std::make_shared<tesseract_geometry::Plane>(1, 1, 1, 1) |
auto | sphere = std::make_shared<tesseract_geometry::Sphere>(1) |
auto | convex_mesh = std::make_shared<tesseract_geometry::ConvexMesh>(vertices, faces) |
auto | mesh = std::make_shared<tesseract_geometry::Mesh>(vertices, faces) |
auto | sdf_mesh = std::make_shared<tesseract_geometry::SDFMesh>(vertices, faces) |
auto | octree = std::make_shared<tesseract_geometry::Octree>(nullptr, tesseract_geometry::Octree::SubType::BOX) |
TestPointCloud | pc |
auto | octree_pc |
auto | geom = std::make_shared<T>(1, 1, 1) |
auto | geom_clone = geom->clone() |
std::string | mesh_file = std::string(TESSERACT_SUPPORT_DIR) + "/meshes/sphere_p25m.stl" |
std::vector< Mesh::Ptr > | meshes = createMeshFromPath<Mesh>(mesh_file) |
std::vector< ConvexMesh::Ptr > | convex_meshes |
typedef tesseract_geometry::SDFMesh T |
vertices emplace_back | ( | - | 1, |
- | 1, | ||
0 | |||
) |
vertices emplace_back | ( | 1 | , |
- | 1, | ||
0 | |||
) |
vertices emplace_back | ( | 1 | , |
1 | , | ||
0 | |||
) |
EXPECT_NEAR | ( | geom-> | getX(), |
1 | , | ||
1e- | 5 | ||
) |
EXPECT_NEAR | ( | std::static_pointer_cast< T > | geom_clone) ->getA(, |
1 | , | ||
1e- | 5 | ||
) |
EXPECT_NEAR | ( | std::static_pointer_cast< T > | geom_clone) ->getB(, |
1 | , | ||
1e- | 5 | ||
) |
EXPECT_NEAR | ( | std::static_pointer_cast< T > | geom_clone) ->getC(, |
1 | , | ||
1e- | 5 | ||
) |
EXPECT_NEAR | ( | std::static_pointer_cast< T > | geom_clone) ->getD(, |
1 | , | ||
1e- | 5 | ||
) |
EXPECT_NEAR | ( | std::static_pointer_cast< T > | geom_clone) ->getLength(, |
1 | , | ||
1e- | 5 | ||
) |
EXPECT_NEAR | ( | std::static_pointer_cast< T > | geom_clone) ->getRadius(, |
1 | , | ||
1e- | 5 | ||
) |
EXPECT_NEAR | ( | std::static_pointer_cast< T > | geom_clone) ->getX(, |
1 | , | ||
1e- | 5 | ||
) |
EXPECT_NEAR | ( | std::static_pointer_cast< T > | geom_clone) ->getY(, |
1 | , | ||
1e- | 5 | ||
) |
EXPECT_NEAR | ( | std::static_pointer_cast< T > | geom_clone) ->getZ(, |
1 | , | ||
1e- | 5 | ||
) |
EXPECT_TRUE | ( | convex_meshes. | size() = =1 | ) |
EXPECT_TRUE | ( | convex_meshes-> | getFaceCount()[0] = =6 | ) |
EXPECT_TRUE | ( | geom->getFaces() ! | = nullptr | ) |
EXPECT_TRUE | ( | geom->getMaterial() ! | = nullptr | ) |
EXPECT_TRUE | ( | geom->getOctree() ! | = nullptr | ) |
EXPECT_TRUE | ( | geom-> | getVertexCount() = =4 | ) |
EXPECT_TRUE | ( | geom->getVertices() ! | = nullptr | ) |
EXPECT_TRUE | ( | meshes. | size() = =1 | ) |
EXPECT_TRUE | ( | meshes-> | getFaceCount()[0] = =80 | ) |
EXPECT_TRUE | ( | meshes-> | getFaceCount()[1] = =80 | ) |
EXPECT_TRUE | ( | std::static_pointer_cast< T > | geom_clone) ->getFaceCount( = =1 | ) |
EXPECT_TRUE | ( | std::static_pointer_cast< T >(geom_clone) ->getFaces() ! | = nullptr | ) |
EXPECT_TRUE | ( | std::static_pointer_cast< T >(geom_clone) ->getMaterial() ! | = nullptr | ) |
EXPECT_TRUE | ( | std::static_pointer_cast< T > | geom_clone) ->getMaterial( = =nullptr | ) |
EXPECT_TRUE | ( | std::static_pointer_cast< T >(geom_clone) ->getOctree() ! | = nullptr | ) |
EXPECT_TRUE | ( | std::static_pointer_cast< T > | geom_clone) ->getSubType( = =tesseract_geometry::Octree::SubType::BOX | ) |
EXPECT_TRUE | ( | std::static_pointer_cast< T > | geom_clone) ->getVertexCount( = =4 | ) |
EXPECT_TRUE | ( | std::static_pointer_cast< T >(geom_clone) ->getVertices() ! | = nullptr | ) |
int main | ( | int | argc, |
char ** | argv | ||
) |
faces resize | ( | 5 | ) |
faces resize | ( | 8 | ) |
auto box = std::make_shared<tesseract_geometry::Box>(1, 1, 1) |
auto capsule = std::make_shared<tesseract_geometry::Capsule>(1, 1) |
auto cone = std::make_shared<tesseract_geometry::Cone>(1, 1) |
auto convex_mesh = std::make_shared<tesseract_geometry::ConvexMesh>(vertices, faces) |
std::vector<ConvexMesh::Ptr> convex_meshes |
auto cylinder = std::make_shared<tesseract_geometry::Cylinder>(1, 1) |
(* faces)(7) = std::make_shared<const Eigen::VectorXi>() |
std::vector< tesseract_geometry::SDFMesh::Ptr > geom = std::make_shared<T>(1, 1, 1) |
auto mesh = std::make_shared<tesseract_geometry::Mesh>(vertices, faces) |
mesh_file = std::string(TESSERACT_SUPPORT_DIR) + "/meshes/sphere_p25m.stl" |
meshes = createMeshFromPath<Mesh>(mesh_file) |
auto octree = std::make_shared<tesseract_geometry::Octree>(nullptr, tesseract_geometry::Octree::SubType::BOX) |
auto octree_pc |
auto plane = std::make_shared<tesseract_geometry::Plane>(1, 1, 1, 1) |
auto sdf_mesh = std::make_shared<tesseract_geometry::SDFMesh>(vertices, faces) |
auto sphere = std::make_shared<tesseract_geometry::Sphere>(1) |
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH TESSERACT_COMMON_IGNORE_WARNINGS_POP |