Skip to content

Commit

Permalink
Updated environment benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
marip8 committed Jan 5, 2022
1 parent 5e01db6 commit e29a770
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <benchmark/benchmark.h>
#include <algorithm>
#include <tesseract_urdf/urdf_parser.h>
TESSERACT_COMMON_IGNORE_WARNINGS_POP
#include <tesseract_environment/environment.h>
#include <tesseract_environment/ofkt/ofkt_state_solver.h>
#include <tesseract_common/resource_locator.h>
#include <tesseract_urdf/urdf_parser.h>

using namespace tesseract_scene_graph;
using namespace tesseract_collision;
Expand Down Expand Up @@ -42,8 +42,7 @@ SceneGraph::Ptr getSceneGraph()
{
std::string path = std::string(TESSERACT_SUPPORT_DIR) + "/urdf/lbr_iiwa_14_r820.urdf";

tesseract_scene_graph::ResourceLocator::Ptr locator =
std::make_shared<tesseract_scene_graph::SimpleResourceLocator>(locateResource);
tesseract_common::SimpleResourceLocator locator(locateResource);
return tesseract_urdf::parseURDFFile(path, locator);
}

Expand All @@ -55,12 +54,12 @@ static void BM_ENVIRONMENT_CLONE(benchmark::State& state, Environment::Ptr env)
{
benchmark::DoNotOptimize(clone = env->clone());
}
};
}

int main(int argc, char** argv)
{
Environment::Ptr env = std::make_shared<Environment>();
env->init<OFKTStateSolver>(*getSceneGraph());
env->init(*getSceneGraph());

//////////////////////////////////////
// Clone
Expand Down

0 comments on commit e29a770

Please sign in to comment.