Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Humanoid Path Planner
hpp-fcl
Commits
9aaac1c1
Commit
9aaac1c1
authored
Jul 03, 2020
by
Joseph Mirabel
Browse files
Add operator== for requests + bind StdVec of requests.
parent
58c08c80
Changes
3
Hide whitespace changes
Inline
Side-by-side
include/hpp/fcl/collision_data.h
View file @
9aaac1c1
...
...
@@ -157,6 +157,14 @@ struct HPP_FCL_DLLAPI QueryRequest
{}
void
updateGuess
(
const
QueryResult
&
result
);
/// @brief whether two QueryRequest are the same or not
inline
bool
operator
==
(
const
QueryRequest
&
other
)
const
{
return
enable_cached_gjk_guess
==
other
.
enable_cached_gjk_guess
&&
cached_gjk_guess
==
other
.
cached_gjk_guess
&&
cached_support_func_guess
==
other
.
cached_support_func_guess
;
}
};
/// @brief base class for all query results
...
...
@@ -234,6 +242,17 @@ struct HPP_FCL_DLLAPI CollisionRequest : QueryRequest
}
bool
isSatisfied
(
const
CollisionResult
&
result
)
const
;
/// @brief whether two CollisionRequest are the same or not
inline
bool
operator
==
(
const
CollisionRequest
&
other
)
const
{
return
QueryRequest
::
operator
==
(
other
)
&&
num_max_contacts
==
other
.
num_max_contacts
&&
enable_contact
==
other
.
enable_contact
&&
enable_distance_lower_bound
==
other
.
enable_distance_lower_bound
&&
security_margin
==
other
.
security_margin
&&
break_distance
==
other
.
break_distance
;
}
};
/// @brief collision result
...
...
@@ -354,6 +373,15 @@ struct HPP_FCL_DLLAPI DistanceRequest : QueryRequest
}
bool
isSatisfied
(
const
DistanceResult
&
result
)
const
;
/// @brief whether two DistanceRequest are the same or not
inline
bool
operator
==
(
const
DistanceRequest
&
other
)
const
{
return
QueryRequest
::
operator
==
(
other
)
&&
enable_nearest_points
==
other
.
enable_nearest_points
&&
rel_err
==
other
.
rel_err
&&
abs_err
==
other
.
abs_err
;
}
};
/// @brief distance result
...
...
python/collision.cc
View file @
9aaac1c1
...
...
@@ -102,6 +102,13 @@ void exposeCollisionAPI ()
;
}
if
(
!
eigenpy
::
register_symbolic_link_to_registered_type
<
std
::
vector
<
CollisionRequest
>
>
())
{
class_
<
std
::
vector
<
CollisionRequest
>
>
(
"StdVec_CollisionRequest"
)
.
def
(
vector_indexing_suite
<
std
::
vector
<
CollisionRequest
>
>
())
;
}
if
(
!
eigenpy
::
register_symbolic_link_to_registered_type
<
Contact
>
())
{
class_
<
Contact
>
(
"Contact"
,
...
...
python/distance.cc
View file @
9aaac1c1
...
...
@@ -89,6 +89,13 @@ void exposeDistanceAPI ()
;
}
if
(
!
eigenpy
::
register_symbolic_link_to_registered_type
<
std
::
vector
<
DistanceRequest
>
>
())
{
class_
<
std
::
vector
<
DistanceRequest
>
>
(
"StdVec_DistanceRequest"
)
.
def
(
vector_indexing_suite
<
std
::
vector
<
DistanceRequest
>
>
())
;
}
if
(
!
eigenpy
::
register_symbolic_link_to_registered_type
<
DistanceResult
>
())
{
class_
<
DistanceResult
,
bases
<
QueryResult
>
>
(
"DistanceResult"
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment