Verified Commit 8196a07c authored by Justin Carpentier's avatar Justin Carpentier
Browse files

core: remove enable_early_stopping

parent 9f2d194d
Pipeline #13756 passed with stage
in 52 minutes and 42 seconds
......@@ -107,7 +107,6 @@ public:
solver.support_func_cached_guess = request.cached_support_func_guess;
}
if(request.enable_early_stopping)
solver.distance_upper_bound = request.distance_upper_bound;
std::size_t res;
......
......@@ -192,7 +192,6 @@ enum CollisionRequestFlag
{
CONTACT = 0x00001,
DISTANCE_LOWER_BOUND = 0x00002,
EARLY_STOPPING = 0x00004,
NO_REQUEST = 0x01000
};
......@@ -208,9 +207,6 @@ struct HPP_FCL_DLLAPI CollisionRequest : QueryRequest
/// Whether a lower bound on distance is returned when objects are disjoint
bool enable_distance_lower_bound;
/// Whether GJK stops when it proves that the distance between two geometries is greater than distance_upper_bound.
bool enable_early_stopping;
/// @brief Distance below which objects are considered in collision.
/// See \ref hpp_fcl_collision_and_distance_lower_bound_computation
FCL_REAL security_margin;
......@@ -229,7 +225,6 @@ struct HPP_FCL_DLLAPI CollisionRequest : QueryRequest
num_max_contacts(num_max_contacts_),
enable_contact(flag & CONTACT),
enable_distance_lower_bound (flag & DISTANCE_LOWER_BOUND),
enable_early_stopping (flag & EARLY_STOPPING),
security_margin (0),
break_distance (1e-3),
distance_upper_bound ((std::numeric_limits<FCL_REAL>::max)())
......@@ -240,7 +235,6 @@ struct HPP_FCL_DLLAPI CollisionRequest : QueryRequest
num_max_contacts(1),
enable_contact(false),
enable_distance_lower_bound (false),
enable_early_stopping (false),
security_margin (0),
break_distance (1e-3),
distance_upper_bound ((std::numeric_limits<FCL_REAL>::max)())
......@@ -256,7 +250,6 @@ struct HPP_FCL_DLLAPI CollisionRequest : QueryRequest
&& num_max_contacts == other.num_max_contacts
&& enable_contact == other.enable_contact
&& enable_distance_lower_bound == other.enable_distance_lower_bound
&& enable_early_stopping == other.enable_early_stopping
&& security_margin == other.security_margin
&& break_distance == other.break_distance
&& distance_upper_bound == other.distance_upper_bound;
......
......@@ -73,7 +73,6 @@ namespace fcl
details::GJK gjk((unsigned int )gjk_max_iterations, gjk_tolerance);
if(enable_early_stopping)
gjk.setDistanceEarlyBreak(distance_upper_bound);
details::GJK::Status gjk_status = gjk.evaluate(shape, guess, support_hint);
......@@ -151,7 +150,6 @@ namespace fcl
details::GJK gjk((unsigned int )gjk_max_iterations, gjk_tolerance);
if(enable_early_stopping)
gjk.setDistanceEarlyBreak(distance_upper_bound);
details::GJK::Status gjk_status = gjk.evaluate(shape, guess, support_hint);
......@@ -233,7 +231,6 @@ namespace fcl
details::GJK gjk((unsigned int) gjk_max_iterations, gjk_tolerance);
if(enable_early_stopping)
gjk.setDistanceEarlyBreak(distance_upper_bound);
details::GJK::Status gjk_status = gjk.evaluate(shape, guess, support_hint);
......@@ -320,7 +317,6 @@ namespace fcl
enable_cached_guess = false;
cached_guess = Vec3f(1, 0, 0);
support_func_cached_guess = support_func_guess_t::Zero();
enable_early_stopping = false;
distance_upper_bound = (std::numeric_limits<FCL_REAL>::max)();
}
......@@ -366,12 +362,8 @@ namespace fcl
/// @brief smart guess for the support function
mutable support_func_guess_t support_func_cached_guess;
/// @brief Whether GJK solver makes an early stopping if it proves that the distance between two geometries
/// is above a certain threshold
mutable bool enable_early_stopping;
/// @brief Distance above which the GJK solver stoppes its computations. The two witness points are incorrect,
/// but with the guaranty that the two shapes have a distance greather than distance_upper_bound.
/// @brief Distance above which the GJK solver stoppes its computations and processes to an early stopping.
/// The two witness points are incorrect, but with the guaranty that the two shapes have a distance greather than distance_upper_bound.
mutable FCL_REAL distance_upper_bound;
};
......
......@@ -76,7 +76,6 @@ void exposeCollisionAPI ()
enum_ <CollisionRequestFlag> ("CollisionRequestFlag")
.value ("CONTACT", CONTACT)
.value ("DISTANCE_LOWER_BOUND", DISTANCE_LOWER_BOUND)
.value ("EARLY_STOPPING", EARLY_STOPPING)
.value ("NO_REQUEST", NO_REQUEST)
.export_values()
;
......@@ -104,7 +103,6 @@ void exposeCollisionAPI ()
.DEF_RW_CLASS_ATTRIB (CollisionRequest, enable_distance_lower_bound)
.DEF_RW_CLASS_ATTRIB (CollisionRequest, security_margin )
.DEF_RW_CLASS_ATTRIB (CollisionRequest, break_distance )
.DEF_RW_CLASS_ATTRIB (CollisionRequest, enable_early_stopping )
.DEF_RW_CLASS_ATTRIB (CollisionRequest, distance_upper_bound )
;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment