Skip to content
Snippets Groups Projects
Unverified Commit dfea82e8 authored by Guilhem Saurel's avatar Guilhem Saurel Committed by GitHub
Browse files

Merge pull request #3 from nim65s/master

Update the repository to the version used for the first submission of the article
parents ebd7527d b4624239
No related branches found
No related tags found
No related merge requests found
prefix
build
.git
[submodule "libs/kdl"]
path = libs/kdl
url = https://github.com/orocos/orocos_kinematics_dynamics.git
[submodule "libs/pinocchio"]
[submodule "pinocchio"]
path = libs/pinocchio
url = https://github.com/stack-of-tasks/pinocchio.git
url = ../../stack-of-tasks/pinocchio.git
shallow = true
fetchRecurseSubmodules = true
[submodule "benchmark"]
path = libs/benchmark
url = ../../google/benchmark.git
shallow = true
fetchRecurseSubmodules = false
[submodule "nao"]
path = libs/nao_description
url = ../../iaslab-unipd/nao_description.git
shallow = true
fetchRecurseSubmodules = false
[submodule "poppy"]
path = libs/poppy-humanoid
url = ../../poppy-project/poppy-humanoid.git
shallow = true
fetchRecurseSubmodules = false
[submodule "kdl"]
path = libs/kdl
url = ../../orocos/orocos_kinematics_dynamics.git
[submodule "kdl_parser"]
path = libs/kdl_parser
url = ../../ros/kdl_parser.git
[submodule "eigen"]
path = libs/eigen
url = ../../eigenteam/eigen-git-mirror
[submodule "hyq"]
path = libs/hyq-description
url = ../../iit-DLSLab/hyq-description.git
[submodule "lwr"]
path = libs/lwr-robot-description
url = ../../corlab/lwr-robot-description.git
[submodule "atlas"]
path = libs/ihmc_atlas_ros
url = ../../ihmcrobotics/ihmc_atlas_ros.git
[submodule "sensors-description"]
path = libs/sensors-description
url = ../../iit-DLSLab/sensors-description
[submodule "metapod"]
path = libs/metapod
url = ../../laas/metapod
[submodule "talos"]
path = libs/talos_robot
url = ../../pal-robotics/talos_robot.git
[submodule "tiago"]
path = libs/tiago_robot
url = ../../pal-robotics/tiago_robot.git
[submodule "pr2"]
path = libs/pr2
url = ../../pr2/pr2_common.git
CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
SET (CXX_DISABLE_WERROR ON)
set (CMAKE_CXX_STANDARD 11)
INCLUDE(cmake/base.cmake)
......@@ -10,12 +9,39 @@ SET(PROJECT_DESCRIPTION "Benchmarks of the Pinocchio library, against RBDL & KDL
SET(PROJECT_URL https://github.com/stack-of-tasks/${PROJECT_NAME})
SET(DOXYGEN_USE_MATHJAX YES)
SETUP_PROJECT()
ADD_REQUIRED_DEPENDENCY("eigen3")
ADD_REQUIRED_DEPENDENCY("pinocchio")
ADD_REQUIRED_DEPENDENCY("rbdl")
ADD_REQUIRED_DEPENDENCY("orocos-kdl")
ADD_REQUIRED_DEPENDENCY("kdl_parser")
ADD_REQUIRED_DEPENDENCY("urdfdom")
#ADD_REQUIRED_DEPENDENCY("benchmark")
#ADD_REQUIRED_DEPENDENCY("metapod")
SET(MODELS
simple
romeo
nao
poppy
lwr
atlas
hyq
talos
tiago
)
LIST(LENGTH MODELS MODELS_LEN)
STRING(REPLACE ";" "\", \"" MODELS_CXX "${MODELS}")
STRING(REPLACE ";" ".urdf;models/" MODEL_FILES "${MODELS}")
SET(MODEL_FILES "models/${MODEL_FILES}.urdf")
INSTALL(FILES ${MODEL_FILES}
DESTINATION "share/pinocchio-benchmarks/models"
)
ADD_SUBDIRECTORY("src")
......
FROM ubuntu:16.04
RUN mkdir /benchmarks
WORKDIR /benchmarks
RUN apt update -qqy \
&& apt install -qqy \
ccache \
clang-6.0 \
cmake \
libcppunit-dev \
libboost-all-dev \
liburdfdom-dev
ADD . .
RUN ./compile.sh
CMD ./run.sh
# Benchmarking Pinocchio
## Setup your environment
Using docker:
You need both eigen2 (for KDL) and eigen3 (for RBDL & Pinocchio):
```
sudo apt install -qqy libeigen{2,3}-dev
docker run --rm -it gepetto/pinocchio-benchmarks
```
You have to choose the `PREFIX` in which you want to install Pinocchio, RBDL & KDL:
## Install Pinocchio & KDL binaries
```
sudo apt install -qqy robotpkg-pinocchio liborocos-kdl-dev libkdl-parser-dev
```
## Configure your prefix
```
export PREFIX=$PWD/prefix # with bash / zsh
......@@ -18,68 +22,36 @@ set -x PREFIX $PWD/prefix # with fish
set -x LD_LIBRARY_PATH $PREFIX/lib:$LD_LIBRARY_PATH
```
## Pinocchio
### Downloading
If you did not clone this repository with the `--recursive` options, you will have to get the submodules with:
```
git submodule update --init --recursive
```
### Installing
```
mkdir -p build/pinocchio
pushd build/pinocchio
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_CXX_STANDARD=11 ../../libs/pinocchio
make -j8 install
popd
```
## KDL
### Installing
```
mkdir -p build/kdl
pushd build/kdl
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX ../../libs/kdl/orocos_kdl
make -j8 install
popd
```
## RBDL
### Downloading
RBDL uses mercurial, and git-hg can't clone it, so we can't provide a git submodule, and you have to download it:
## Install RBDL
```
wget https://bitbucket.org/rbdl/rbdl/get/default.zip
unzip default.zip
rm default.zip
mv rbdl-rbdl-* libs/rbdl
mkdir -p build/rbdl
pushd build/rbdl
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_INSTALL_LIBDIR=lib -DRBDL_BUILD_ADDON_URDFREADER=ON ../../libs/rbdl
make -j8 install
popd
```
### Installing
## Install Google Benchmark
```
mkdir -p build/rbdl
pushd build/rbdl
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DRBDL_BUILD_ADDON_URDFREADER=ON ../../libs/rbdl
mkdir -p build/google-benchmark
pushd build/google-benchmark
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_INSTALL_LIBDIR=lib -DBENCHMARK_ENABLE_GTEST_TESTS=OFF ../../libs/benchmark
make -j8 install
popd
```
## Benchmarks
### Installing
## Install
```
mkdir -p build/benchmarks
pushd build/benchmarks
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_PREFIX_PATH=$PREFIX ../..
mkdir -p build/pinocchio-benchmarks
pushd build/pinocchio-benchmarks
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_PREFIX_PATH=$PREFIX ../..
make -j8 install
popd
```
......@@ -87,8 +59,10 @@ popd
### Running
```
./prefix/bin/rbdl-bench models/simple_humanoid.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/romeo/romeo_description/urdf/romeo.urdf
sudo cpupower frequency-set --governor performance
$PREFIX/bin/rbdl-test
$PREFIX/bin/pinocchio-test
$PREFIX/bin/pinocchio-benchmark
$PREFIX/bin/rbdl-benchmark
sudo cpupower frequency-set --governor powersave
```
#!/bin/bash
set -e
set -x
[[ -d build || -d prefix ]] && rm -rf build prefix
export PREFIX=${1:-$PWD/prefix} # with bash / zsh
export PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig:/opt/ros/kinetic/lib/pkgconfig
export LD_LIBRARY_PATH=${PREFIX}/lib:/opt/ros/kinetic/lib:${LD_LIBRARY_PATH}
export CXX="ccache clang++-6.0"
export CC="ccache clang-6.0"
BUILD_TYPE=Release
mkdir -p build/eigen
pushd build/eigen
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_INSTALL_LIBDIR=lib \
../../libs/eigen
make -j8 install
popd
mkdir -p build/pinocchio
pushd build/pinocchio
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_PREFIX_PATH=$PREFIX \
-DBUILD_PYTHON_INTERFACE=OFF -DBUILD_UNIT_TESTS=OFF -DINSTALL_DOCUMENTATION=OFF \
../../libs/pinocchio
make -j8 install
popd
#export CXX="ccache g++"
#export CC="ccache gcc"
#mkdir -p build/metapod
#pushd build/metapod
#cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_INSTALL_LIBDIR=lib \
#-DCMAKE_PREFIX_PATH=$PREFIX \
#-DDOXYGEN_USE_MATHJAX=YES \
#../../libs/metapod
#make -j8 install
#popd
#export CXX="ccache clang++-6.0"
#export CC="ccache clang-6.0"
mkdir -p build/kdl
pushd build/kdl
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_INSTALL_LIBDIR=lib \
-DENABLE_TESTS=ON -DCMAKE_CXX_STANDARD=98 \
../../libs/kdl/orocos_kdl
make -j8 install
popd
mkdir -p build/kdl_parser
pushd build/kdl_parser
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_PREFIX_PATH="$PREFIX;/opt/ros/kinetic" \
../../libs/kdl_parser/kdl_parser
make -j8 install
popd
if [[ ! -d libs/rbdl ]]
then
wget https://bitbucket.org/rbdl/rbdl/get/default.zip
unzip default.zip
rm default.zip
mv rbdl-rbdl-* libs/rbdl
fi
mkdir -p build/rbdl
pushd build/rbdl
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_PREFIX_PATH="$PREFIX;/opt/ros/kinetic" \
-DRBDL_BUILD_ADDON_URDFREADER=ON \
../../libs/rbdl
make -j8 install
popd
#mkdir -p build/google-benchmark
#pushd build/google-benchmark
#cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_INSTALL_LIBDIR=lib \
#-DCMAKE_PREFIX_PATH=$PREFIX \
#-DBENCHMARK_ENABLE_GTEST_TESTS=OFF \
#../../libs/benchmark
#make -j8 install
#popd
mkdir -p build/pinocchio-benchmarks
pushd build/pinocchio-benchmarks
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=$PREFIX -DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_PREFIX_PATH=$PREFIX \
../..
make -j8 install
popd
*.txt
#!/usr/bin/env python3
from pathlib import Path
import pandas
PATH = Path('data')
# data = {}
# for logs in PATH.glob('*.txt'):
# with logs.open() as f:
# data[logs.stem] = [int(i) for i in f.readlines()]
# df = pandas.DataFrame(data)
# datasets = [f.stem.split('_') for f in PATH.glob('*.txt')]
# hostnames, libs, algos, models = (set(d[i] for d in datasets) for i in range(4))
if __name__ == '__main__':
data_2 = []
for log in PATH.glob('*.txt'):
with log.open() as f:
for line in f.readlines():
data_2.append(log.stem.split('_') + [int(line)])
df_2 = pandas.DataFrame(data_2, columns=['hostname', 'lib', 'algo', 'model', 'time'])
df_2.loc[df_2['lib'] == 'Pinocchio'].groupby('algo').boxplot(by=['model'], sym='')
# df_2.loc[df_2['model'] == 'lwr']].groupby('algo').boxplot(by=['lib', 'model'], sym='')
Subproject commit 94c4d6d5c65b8f0a5f9963db7d93e9568f8aa3db
Subproject commit dde02fceedfc1ba09d4d4f71a2b5dafcfcb85491
Subproject commit 43cc075a628a41a30779cfde22f249aef3ae2d67
Subproject commit f44d698be7ee52c177432dd0bbb7314a1dd3c9d6
Subproject commit ce11d1c8158e57f255a85700373c0d0b105cad82
Subproject commit f51621f6571e5ad9512ea12741bece39b4ce919b
Subproject commit 7f52d8db94cab754e4cc5bca1c68641e5576e9fe
Subproject commit b30088b075a500e0bffabdcb40f7abcc39724adc
Subproject commit e55f69eea66a29cfad594dd210fe8df6e5fc72fd
Subproject commit 9e1d7b0e1ed83a8f16dc9daf2fef0bb9a792a73d
Subproject commit 9ab087d9eef287057f420a6ff68e854e4fd12cbf
Subproject commit e37ac7fecaf5b843cd182d8f251679036d0fbe4f
Subproject commit 5b6c54e55cc8218757581041d6118a28c89515ed
Subproject commit 6f96993793230c81737478729c4e324c3574424a
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment