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
702f0651
Commit
702f0651
authored
6 years ago
by
Guilhem Saurel
Browse files
Options
Downloads
Patches
Plain Diff
add rbdl bench
parent
88e2e4a0
No related branches found
No related tags found
1 merge request
!1
Basis to run ABA & RNEA on Pinocchio & RBDL with the URDF models provided by Pinocchio
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CMakeLists.txt
+2
-0
2 additions, 0 deletions
CMakeLists.txt
README.md
+9
-0
9 additions, 0 deletions
README.md
src/CMakeLists.txt
+7
-0
7 additions, 0 deletions
src/CMakeLists.txt
src/rbdl-bench.cpp
+44
-0
44 additions, 0 deletions
src/rbdl-bench.cpp
with
62 additions
and
0 deletions
CMakeLists.txt
+
2
−
0
View file @
702f0651
...
...
@@ -16,4 +16,6 @@ ADD_REQUIRED_DEPENDENCY("pinocchio")
ADD_REQUIRED_DEPENDENCY
(
"rbdl"
)
ADD_REQUIRED_DEPENDENCY
(
"orocos-kdl"
)
ADD_SUBDIRECTORY
(
"src"
)
SETUP_PROJECT_FINALIZE
()
This diff is collapsed.
Click to expand it.
README.md
+
9
−
0
View file @
702f0651
...
...
@@ -12,8 +12,10 @@ You have to choose the `PREFIX` in which you want to install Pinocchio, RBDL & K
```
export PREFIX=$PWD/prefix # with bash / zsh
export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH
# OR
set -x PREFIX $PWD/prefix # with fish
set -x LD_LIBRARY_PATH $PREFIX/lib:$LD_LIBRARY_PATH
```
## Pinocchio
...
...
@@ -81,3 +83,10 @@ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_PREFIX_P
make install
popd
```
### Running
```
./prefix/bin/rbdl-bench models/simple_humanoid.urdf
./prefix/bin/rbdl-bench models/romeo/romeo_description/urdf/romeo.urdf
```
This diff is collapsed.
Click to expand it.
src/CMakeLists.txt
0 → 100644
+
7
−
0
View file @
702f0651
LINK_DIRECTORIES
(
${
RBDL_LIBRARY_DIRS
}
)
ADD_EXECUTABLE
(
rbdl-bench rbdl-bench
)
TARGET_INCLUDE_DIRECTORIES
(
rbdl-bench PUBLIC
${
RBDL_INCLUDE_DIRS
}
)
TARGET_LINK_LIBRARIES
(
rbdl-bench rbdl_urdfreader
${
RBDL_LIBRARIES
}
${
EIGEN3_LIBRARIES
}
)
INSTALL
(
TARGETS rbdl-bench RUNTIME DESTINATION bin
)
This diff is collapsed.
Click to expand it.
src/rbdl-bench.cpp
0 → 100644
+
44
−
0
View file @
702f0651
#include
<iostream>
#include
<fstream>
#include
<rbdl/rbdl.h>
#include
<rbdl/addons/urdfreader/urdfreader.h>
using
namespace
RigidBodyDynamics
;
using
namespace
RigidBodyDynamics
::
Addons
;
using
namespace
RigidBodyDynamics
::
Math
;
int
main
(
int
argc
,
char
**
argv
)
{
if
(
argc
!=
2
)
{
std
::
cerr
<<
"You have to specify a path to an urdf file"
<<
std
::
endl
;
return
1
;
}
std
::
ifstream
path
(
argv
[
1
]);
if
(
!
path
)
{
std
::
cerr
<<
"This path is not a valid file: "
<<
argv
[
1
]
<<
std
::
endl
;
return
2
;
}
Model
*
model
=
new
Model
();
// Load an urdf file provided by the user, with a floating base
URDFReadFromFile
(
argv
[
1
],
model
,
true
);
VectorNd
Q
=
VectorNd
::
Zero
(
model
->
dof_count
);
VectorNd
QDot
=
VectorNd
::
Zero
(
model
->
dof_count
);
VectorNd
Tau
=
VectorNd
::
Zero
(
model
->
dof_count
);
VectorNd
QDDot
=
VectorNd
::
Zero
(
model
->
dof_count
);
ForwardDynamics
(
*
model
,
Q
,
QDot
,
Tau
,
QDDot
);
std
::
cout
<<
"QDDot after ABA: "
<<
QDDot
.
transpose
()
<<
std
::
endl
;
InverseDynamics
(
*
model
,
Q
,
QDot
,
QDDot
,
Tau
);
std
::
cout
<<
"Tau aftern RNEA: "
<<
Tau
.
transpose
()
<<
std
::
endl
;
delete
model
;
return
0
;
}
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