37 #define BOOST_TEST_MODULE FCL_GEOMETRIC_SHAPES 38 #include <boost/test/included/unit_test.hpp> 40 #define CHECK_CLOSE_TO_0(x, eps) BOOST_CHECK_CLOSE((x + 1.0), (1.0), (eps)) 52 typedef hpp::fcl::shared_ptr<hpp::fcl::CollisionGeometry>
57 CollisionGeometryPtr_t boxGeometry(
new hpp::fcl::Box(1., 2., 4.));
71 distanceResult.
clear();
76 BOOST_CHECK_CLOSE(distanceResult.
min_distance, 5.5, 1e-2);
77 BOOST_CHECK_CLOSE(o1[0], -6, 1e-2);
78 BOOST_CHECK_CLOSE(o1[1], 0.8, 1e-1);
79 BOOST_CHECK_CLOSE(o1[2], 1.5, 1e-2);
80 BOOST_CHECK_CLOSE(o2[0], -0.5, 1e-2);
81 BOOST_CHECK_CLOSE(o2[1], 0.8, 1e-1);
82 BOOST_CHECK_CLOSE(o2[2], 1.5, 1e-2);
request to the distance computation
Vec3f nearest_points[2]
nearest points
void clear()
clear the result
Quaternion3f makeQuat(FCL_REAL w, FCL_REAL x, FCL_REAL y, FCL_REAL z)
HPP_FCL_DLLAPI FCL_REAL distance(const Matrix3f &R0, const Vec3f &T0, const kIOS &b1, const kIOS &b2, Vec3f *P=NULL, Vec3f *Q=NULL)
Approximate distance between two kIOS bounding volumes.
BOOST_AUTO_TEST_CASE(distance_capsule_box)
FCL_REAL min_distance
minimum distance between two objects. if two objects are in collision, min_distance <= 0...
Center at zero point, axis aligned box.
Capsule It is where is the distance between the point x and the capsule segment AB...
shared_ptr< CollisionGeometry > CollisionGeometryPtr_t
Eigen::Matrix< FCL_REAL, 3, 1 > Vec3f
the object for collision or distance computation, contains the geometry and the transform information...