Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hpp-fcl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Guilhem Saurel
hpp-fcl
Commits
fe5c1fbb
Commit
fe5c1fbb
authored
5 years ago
by
Joseph Mirabel
Browse files
Options
Downloads
Patches
Plain Diff
Update test_fcl_collision + Add a Python script to display benchmark data.
parent
c76bc1e9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/test_fcl_collision-bench.py
+59
-0
59 additions, 0 deletions
test/test_fcl_collision-bench.py
test/test_fcl_collision.cpp
+296
-806
296 additions, 806 deletions
test/test_fcl_collision.cpp
with
355 additions
and
806 deletions
test/test_fcl_collision-bench.py
0 → 100644
+
59
−
0
View file @
fe5c1fbb
import
matplotlib.pyplot
as
plt
import
csv
,
sys
,
numpy
as
np
from
math
import
sqrt
filename
=
sys
.
argv
[
1
]
with
open
(
filename
,
'
r
'
)
as
file
:
reader
=
csv
.
reader
(
file
,
strict
=
True
)
fieldnames
=
None
#fieldnames = reader.fieldnames
converters
=
(
str
,
int
,
int
,
int
,
float
,
lambda
x
:
float
(
x
)
*
1e-3
)
for
row
in
reader
:
if
fieldnames
is
None
:
fieldnames
=
[
n
.
strip
()
for
n
in
row
]
values
=
[]
continue
values
.
append
(
[
c
(
v
)
for
v
,
c
in
zip
(
row
,
converters
)
]
)
request1
=
values
[:
int
(
len
(
values
)
/
2
)]
request2
=
values
[
int
(
len
(
values
)
/
2
):]
Ntransforms
=
1
while
values
[
0
][
0
:
3
]
==
values
[
Ntransforms
][
0
:
3
]:
Ntransforms
+=
1
splitMethods
=
[
'
avg
'
,
'
med
'
,
'
cen
'
]
BVs
=
list
(
set
([
v
[
0
]
for
v
in
request1
[::
Ntransforms
]
]))
xvals
=
[
BVs
.
index
(
v
[
0
])
+
len
(
BVs
)
*
v
[
2
]
+
3
*
len
(
BVs
)
*
v
[
1
]
for
v
in
request1
[::
Ntransforms
]
]
cases
=
[
v
[
0
]
+
(
"
*
"
if
v
[
1
]
==
1
else
""
)
+
"
"
+
splitMethods
[
v
[
2
]]
for
v
in
request1
[::
Ntransforms
]
]
idx_reorder
=
sorted
(
list
(
range
(
len
(
xvals
))),
key
=
lambda
i
:
xvals
[
i
])
def
reorder
(
l
):
return
[
l
[
i
]
for
i
in
idx_reorder
]
xvals_s
=
reorder
(
xvals
)
cases_s
=
reorder
(
cases
)
# Time
plt
.
figure
(
0
)
for
i
in
range
(
Ntransforms
):
plt
.
plot
(
xvals_s
,
reorder
([
v
[
5
]
for
v
in
request1
[
i
::
Ntransforms
]
])
,
'
-.o
'
,
label
=
str
(
i
))
plt
.
plot
(
xvals_s
,
reorder
([
v
[
5
]
for
v
in
request2
[
i
::
Ntransforms
]
])
,
'
:+
'
,
label
=
str
(
i
)
+
"
+lb
"
)
plt
.
legend
()
plt
.
xticks
(
ticks
=
xvals_s
,
labels
=
cases_s
,
rotation
=
90
)
plt
.
ylabel
(
'
Time (us)
'
)
plt
.
yscale
(
'
log
'
)
# Distance
plt
.
figure
(
1
)
for
i
in
range
(
Ntransforms
):
plt
.
plot
(
xvals_s
,
reorder
([
v
[
4
]
for
v
in
request2
[
i
::
Ntransforms
]
])
,
'
:+
'
,
label
=
str
(
i
)
+
"
+lb
"
)
plt
.
legend
()
plt
.
ylabel
(
'
Distance lower bound
'
)
plt
.
xticks
(
ticks
=
xvals_s
,
labels
=
cases_s
,
rotation
=
90
)
plt
.
show
()
This diff is collapsed.
Click to expand it.
test/test_fcl_collision.cpp
+
296
−
806
View file @
fe5c1fbb
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment