38 #ifndef TEST_HPP_FCL_UTILITY_H 39 #define TEST_HPP_FCL_UTILITY_H 47 #ifdef HPP_FCL_HAS_OCTOMAP 52 #define NOMINMAX // required to avoid compilation errors with Visual Studio 59 #define EIGEN_VECTOR_IS_APPROX(Va, Vb, precision) \ 60 BOOST_CHECK_MESSAGE(((Va) - (Vb)).isZero(precision), \ 61 "check " #Va ".isApprox(" #Vb \ 64 << (Va).transpose() << "\n!=\n" \ 65 << (Vb).transpose() << "\n]") 66 #define EIGEN_MATRIX_IS_APPROX(Va, Vb, precision) \ 67 BOOST_CHECK_MESSAGE(((Va) - (Vb)).isZero(precision), "check " #Va \ 75 #ifdef HPP_FCL_HAS_OCTOMAP 76 typedef hpp::fcl::shared_ptr<octomap::OcTree>
OcTreePtr_t;
89 double getElapsedTime();
90 double getElapsedTimeInSec();
91 double getElapsedTimeInMilliSec();
93 double getElapsedTimeInMicroSec();
100 LARGE_INTEGER frequency;
101 LARGE_INTEGER startCount;
102 LARGE_INTEGER endCount;
116 records.push_back(t);
121 extern const Eigen::IOFormat
vfmt;
122 extern const Eigen::IOFormat
pyfmt;
130 std::vector<Triangle>& triangles);
133 std::vector<Triangle>& triangles);
135 #ifdef HPP_FCL_HAS_OCTOMAP 149 std::vector<Transform3f>& transforms,
157 std::vector<Transform3f>& transforms,
158 std::vector<Transform3f>& transforms2,
187 std::size_t
getNbRun(
const int& argc,
char const*
const* argv,
188 std::size_t defaultValue);
Ellipsoid centered at point zero.
void generateEnvironmentsMesh(std::vector< CollisionObject *> &env, FCL_REAL env_scale, std::size_t n)
void loadOBJFile(const char *filename, std::vector< Vec3f > &points, std::vector< Triangle > &triangles)
Load an obj mesh file.
void generateEnvironments(std::vector< CollisionObject *> &env, FCL_REAL env_scale, std::size_t n)
void generateRandomTransforms(FCL_REAL extents[6], std::vector< Transform3f > &transforms, std::size_t n)
Generate n random transforms whose translations are constrained by extents.
Octree is one type of collision geometry which can encode uncertainty information in the sensor data...
std::size_t getNbRun(const int &argc, char const *const *argv, std::size_t defaultValue)
Get the argument –nb-run from argv.
Quaternion3f makeQuat(FCL_REAL w, FCL_REAL x, FCL_REAL y, FCL_REAL z)
Convex< Triangle > constructPolytopeFromEllipsoid(const Ellipsoid &ellipsoid)
We give an ellipsoid as input. The output is a 20 faces polytope which vertices belong to the origina...
double startTimeInMicroSec
starting time in micro-second
void saveOBJFile(const char *filename, std::vector< Vec3f > &points, std::vector< Triangle > &triangles)
std::ostream & operator<<(std::ostream &out, ColorOcTreeNode::Color const &c)
shared_ptr< OcTree > OcTreePtr_t
std::string getNodeTypeName(NODE_TYPE node_type)
std::vector< double > records
Eigen::Quaternion< FCL_REAL > Quaternion3f
bool defaultDistanceFunction(CollisionObject *o1, CollisionObject *o2, void *data, FCL_REAL &dist)
Collision data for use with the DefaultContinuousCollisionFunction. It stores the collision request a...
Eigen::AngleAxis< FCL_REAL > AngleAxis
NODE_TYPE
traversal node type: bounding volume (AABB, OBB, RSS, kIOS, OBBRSS, KDOP16, KDOP18, kDOP24), basic shape (box, sphere, ellipsoid, capsule, cone, cylinder, convex, plane, triangle), and octree
double endTimeInMicroSec
ending time in micro-second
const Eigen::IOFormat vfmt
Eigen::Matrix< FCL_REAL, 3, 1 > Vec3f
the object for collision or distance computation, contains the geometry and the transform information...
HPP_FCL_DLLAPI Halfspace transform(const Halfspace &a, const Transform3f &tf)
bool defaultCollisionFunction(CollisionObject *o1, CollisionObject *o2, void *data)
Provides a simple callback for the collision query in the BroadPhaseCollisionManager. It assumes the data parameter is non-null and points to an instance of CollisionData. It simply invokes the collide() method on the culled pair of geometries and stores the results in the data's CollisionResult instance.
void generateRandomTransform(FCL_REAL extents[6], Transform3f &transform)
Generate one random transform whose translation is constrained by extents and rotation without constr...
const Eigen::IOFormat pyfmt