From 443243b7862819d401b5c82d8608427af4d28df7 Mon Sep 17 00:00:00 2001
From: Valenza Florian <fvalenza@laas.fr>
Date: Tue, 9 Feb 2016 15:07:19 +0100
Subject: [PATCH] [benchmark][cmake] Re added boost component. Needed by
 timings-geometry.cpp, and use correct name of algorithms

---
 CMakeLists.txt                 |  2 +-
 benchmark/timings-geometry.cpp | 21 +++++++++++----------
 2 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6b43e5f80..77129946e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -69,7 +69,7 @@ IF(HPP_FCL_FOUND AND URDFDOM_FOUND)
   ADD_REQUIRED_DEPENDENCY("assimp")
 ENDIF(HPP_FCL_FOUND AND URDFDOM_FOUND)
 
-SET(BOOST_COMPONENTS filesystem unit_test_framework)
+SET(BOOST_COMPONENTS filesystem unit_test_framework system)
 SEARCH_FOR_BOOST()
 # Path to boost headers
 INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
diff --git a/benchmark/timings-geometry.cpp b/benchmark/timings-geometry.cpp
index ba48abb92..472a8bd44 100644
--- a/benchmark/timings-geometry.cpp
+++ b/benchmark/timings-geometry.cpp
@@ -75,6 +75,7 @@ int main()
   se3::GeometryModel romeo_model_geom = romeo.second;
   Data romeo_data(romeo_model);
   GeometryData romeo_data_geom(romeo_data, romeo_model_geom);
+  romeo_data_geom.initializeListOfCollisionPairs();
 
 
   std::vector<VectorXd> qs_romeo     (NBT);
@@ -128,11 +129,11 @@ int main()
 
 
   timer.tic();
-  SMOOTH(NBT)
+  SMOOTH(NBD)
   {
     computeDistances(romeo_model,romeo_data,romeo_model_geom,romeo_data_geom,qs_romeo[_smooth]);
   }
-  double computeDistancesTime = timer.toc(StackTicToc::US)/NBT - (update_col_time + geom_time);
+  double computeDistancesTime = timer.toc(StackTicToc::US)/NBD - (update_col_time + geom_time);
   std::cout << "Compute distance between two geometry objects (mean time) = \t" << computeDistancesTime / romeo_data_geom.nCollisionPairs
             << " " << StackTicToc::unitName(StackTicToc::US) << " " << romeo_data_geom.nCollisionPairs << " col pairs" << std::endl;
 
@@ -238,41 +239,41 @@ hpp::model::HumanoidRobotPtr_t humanoidRobot =
 
 
   timer.tic();
-  SMOOTH(NBT)
+  SMOOTH(NBD)
   {
     computeDistances(romeo_data_geom);
   }
-  computeDistancesTime = timer.toc(StackTicToc::US)/NBT ;
+  computeDistancesTime = timer.toc(StackTicToc::US)/NBD ;
   std::cout << "Pinocchio - Compute distances (D) " << romeo_data_geom.nCollisionPairs << " col pairs\t" << computeDistancesTime 
             << " " << StackTicToc::unitName(StackTicToc::US) << std::endl;
 
   timer.tic();
-  SMOOTH(NBT)
+  SMOOTH(NBD)
   {
     humanoidRobot->computeDistances ();
   }
-  double hpp_compute_distances = timer.toc(StackTicToc::US)/NBT ;
+  double hpp_compute_distances = timer.toc(StackTicToc::US)/NBD ;
   std::cout << "HPP - Compute distances (D) " << humanoidRobot->distanceResults().size() << " col pairs\t" << hpp_compute_distances 
             << " " << StackTicToc::unitName(StackTicToc::US) << std::endl;
   
   timer.tic();
-  SMOOTH(NBT)
+  SMOOTH(NBD)
   {
     computeDistances(romeo_model, romeo_data, romeo_model_geom, romeo_data_geom, qs_romeo_pino[_smooth]);
   }
-  computeDistancesTime = timer.toc(StackTicToc::US)/NBT ;
+  computeDistancesTime = timer.toc(StackTicToc::US)/NBD ;
   std::cout << "Pinocchio - Update + Compute distances (K+D) " << romeo_data_geom.nCollisionPairs << " col pairs\t" << computeDistancesTime 
             << " " << StackTicToc::unitName(StackTicToc::US) << std::endl;
 
 
   timer.tic();
-  SMOOTH(NBT)
+  SMOOTH(NBD)
   {
     humanoidRobot->currentConfiguration (qs_romeo_hpp[_smooth]);
     humanoidRobot->computeForwardKinematics ();
     humanoidRobot->computeDistances ();
   }
-  hpp_compute_distances = timer.toc(StackTicToc::US)/NBT ;
+  hpp_compute_distances = timer.toc(StackTicToc::US)/NBD ;
   std::cout << "HPP - Update + Compute distances (K+D) " << humanoidRobot->distanceResults().size() << " col pairs\t" << hpp_compute_distances 
             << " " << StackTicToc::unitName(StackTicToc::US) << std::endl;
 
-- 
GitLab