Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pinocchio-benchmarks
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Stack Of Tasks
pinocchio-benchmarks
Commits
a63f9235
Commit
a63f9235
authored
6 years ago
by
Guilhem Saurel
Browse files
Options
Downloads
Patches
Plain Diff
add rbdl-benchmark with google benchmarks & fix pinocchio-benchmark
parent
71edf37f
No related branches found
No related tags found
1 merge request
!3
Update the repository to the version used for the first submission of the article
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+4
-0
4 additions, 0 deletions
README.md
src/CMakeLists.txt
+10
-2
10 additions, 2 deletions
src/CMakeLists.txt
src/rbdl-benchmark.cpp
+43
-0
43 additions, 0 deletions
src/rbdl-benchmark.cpp
with
57 additions
and
2 deletions
README.md
+
4
−
0
View file @
a63f9235
...
@@ -103,4 +103,8 @@ popd
...
@@ -103,4 +103,8 @@ popd
./prefix/bin/rbdl-bench models/romeo/romeo_description/urdf/romeo.urdf
./prefix/bin/rbdl-bench models/romeo/romeo_description/urdf/romeo.urdf
./prefix/bin/pinocchio-bench models/simple_humanoid.urdf
./prefix/bin/pinocchio-bench models/simple_humanoid.urdf
./prefix/bin/pinocchio-bench models/romeo/romeo_description/urdf/romeo.urdf
./prefix/bin/pinocchio-bench models/romeo/romeo_description/urdf/romeo.urdf
sudo cpupower frequency-set --governor performance
./prefix/bin/pinocchio-benchmark
./prefix/bin/rbdl-benchmark
sudo cpupower frequency-set --governor powersave
```
```
This diff is collapsed.
Click to expand it.
src/CMakeLists.txt
+
10
−
2
View file @
a63f9235
...
@@ -9,8 +9,16 @@ ADD_EXECUTABLE(pinocchio-bench pinocchio-bench)
...
@@ -9,8 +9,16 @@ ADD_EXECUTABLE(pinocchio-bench pinocchio-bench)
PKG_CONFIG_USE_DEPENDENCY
(
pinocchio-bench pinocchio
)
PKG_CONFIG_USE_DEPENDENCY
(
pinocchio-bench pinocchio
)
INSTALL
(
TARGETS pinocchio-bench RUNTIME DESTINATION bin
)
INSTALL
(
TARGETS pinocchio-bench RUNTIME DESTINATION bin
)
# RBDL & benchmark
ADD_EXECUTABLE
(
rbdl-benchmark rbdl-benchmark
)
PKG_CONFIG_USE_DEPENDENCY
(
rbdl-benchmark rbdl
)
PKG_CONFIG_USE_DEPENDENCY
(
rbdl-benchmark benchmark
)
TARGET_LINK_LIBRARIES
(
rbdl-benchmark rbdl_urdfreader pthread
)
INSTALL
(
TARGETS rbdl-benchmark RUNTIME DESTINATION bin
)
# Pinocchio & benchmark
# Pinocchio & benchmark
ADD_EXECUTABLE
(
pinocchio-benchmark pinocchio-benchmark
)
ADD_EXECUTABLE
(
pinocchio-benchmark pinocchio-benchmark
)
PKG_CONFIG_USE_DEPENDENCY
(
pinocchio-bench pinocchio
)
PKG_CONFIG_USE_DEPENDENCY
(
pinocchio-benchmark pinocchio
)
PKG_CONFIG_USE_DEPENDENCY
(
pinocchio-bench benchmark
)
PKG_CONFIG_USE_DEPENDENCY
(
pinocchio-benchmark benchmark
)
TARGET_LINK_LIBRARIES
(
pinocchio-benchmark pthread
)
INSTALL
(
TARGETS pinocchio-benchmark RUNTIME DESTINATION bin
)
INSTALL
(
TARGETS pinocchio-benchmark RUNTIME DESTINATION bin
)
This diff is collapsed.
Click to expand it.
src/rbdl-benchmark.cpp
0 → 100644
+
43
−
0
View file @
a63f9235
#include
<iostream>
#include
<fstream>
#include
<benchmark/benchmark.h>
#include
<rbdl/rbdl.h>
#include
<rbdl/addons/urdfreader/urdfreader.h>
static
void
BM_RBDL_RNEA
(
benchmark
::
State
&
state
)
{
RigidBodyDynamics
::
Model
*
model
=
new
RigidBodyDynamics
::
Model
();
// Load an urdf file provided by the user
RigidBodyDynamics
::
Addons
::
URDFReadFromFile
(
"models/simple_humanoid.urdf"
,
model
,
true
);
std
::
cout
<<
"RBDL Benchmark"
<<
std
::
endl
;
std
::
cout
<<
" model: "
<<
"models/simple_humanoid.urdf"
<<
std
::
endl
;
std
::
cout
<<
" nq: "
<<
model
->
q_size
<<
std
::
endl
;
std
::
cout
<<
" nv: "
<<
model
->
qdot_size
<<
std
::
endl
;
RigidBodyDynamics
::
Math
::
VectorNd
q
=
RigidBodyDynamics
::
Math
::
VectorNd
::
Random
(
model
->
q_size
);
RigidBodyDynamics
::
Math
::
VectorNd
qdot
=
RigidBodyDynamics
::
Math
::
VectorNd
::
Random
(
model
->
qdot_size
);
RigidBodyDynamics
::
Math
::
VectorNd
tau
=
RigidBodyDynamics
::
Math
::
VectorNd
::
Random
(
model
->
qdot_size
);
RigidBodyDynamics
::
Math
::
VectorNd
qddot
=
RigidBodyDynamics
::
Math
::
VectorNd
::
Random
(
model
->
qdot_size
);
for
(
auto
_
:
state
)
{
q
=
RigidBodyDynamics
::
Math
::
VectorNd
::
Random
(
model
->
q_size
);
qdot
=
RigidBodyDynamics
::
Math
::
VectorNd
::
Random
(
model
->
qdot_size
);
tau
=
RigidBodyDynamics
::
Math
::
VectorNd
::
Random
(
model
->
qdot_size
);
qddot
=
RigidBodyDynamics
::
Math
::
VectorNd
::
Random
(
model
->
qdot_size
);
RigidBodyDynamics
::
ForwardDynamics
(
*
model
,
q
,
qdot
,
tau
,
qddot
);
//std::cout << "qddot after ABA: " << qddot.transpose() << std::endl;
}
}
BENCHMARK
(
BM_RBDL_RNEA
);
BENCHMARK_MAIN
();
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