Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initial commit

  • Loading branch information...
commit 2a717b637b3ff8cfcc8e02c1803d4c878122386c 1 parent 832444f
I Heart Robotics authored
View
8 ihe_benchmark/stack.xml
@@ -0,0 +1,8 @@
+<stack>
+ <description brief="ihe_benchmark">ROS Performance Benchmark Tools</description>
+ <author>Maintained by I Heart Engineering</author>
+ <license>BSD</license>
+ <review status="unreviewed" notes=""/>
+ <url>http://ros.org/wiki/ihe_benchmark</url>
+ <depend stack="ros" />
+</stack>
View
2  ihe_benchmark/testbench/.gitignore
@@ -0,0 +1,2 @@
+bin
+build
View
32 ihe_benchmark/testbench/CMakeLists.txt
@@ -0,0 +1,32 @@
+cmake_minimum_required(VERSION 2.4.6)
+include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
+
+# Set the build type. Options are:
+# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage
+# Debug : w/ debug symbols, w/o optimization
+# Release : w/o debug symbols, w/ optimization
+# RelWithDebInfo : w/ debug symbols, w/ optimization
+# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries
+#set(ROS_BUILD_TYPE RelWithDebInfo)
+
+rosbuild_init()
+
+#set the default path for built executables to the "bin" directory
+set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
+#set the default path for built libraries to the "lib" directory
+set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
+
+#uncomment if you have defined messages
+#rosbuild_genmsg()
+#uncomment if you have defined services
+#rosbuild_gensrv()
+
+#common commands for building c++ executables and libraries
+#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
+#target_link_libraries(${PROJECT_NAME} another_library)
+#rosbuild_add_boost_directories()
+#rosbuild_link_boost(${PROJECT_NAME} thread)
+#rosbuild_add_executable(example examples/example.cpp)
+#target_link_libraries(example ${PROJECT_NAME})
+
+rosbuild_add_executable(test_loader src/test_loader.cpp)
View
1  ihe_benchmark/testbench/Makefile
@@ -0,0 +1 @@
+include $(shell rospack find mk)/cmake.mk
View
17 ihe_benchmark/testbench/include/testbench/test_base.h
@@ -0,0 +1,17 @@
+#ifndef TESTBENCH_TEST_BASE_H_
+#define TESTBENCH_TEST_BASE_H_
+
+namespace test_base
+{
+ class Test
+ {
+ public:
+ virtual void initialize() = 0;
+ virtual double run() = 0;
+ virtual ~Test(){}
+
+ protected:
+ Test(){}
+ };
+};
+#endif
View
14 ihe_benchmark/testbench/mainpage.dox
@@ -0,0 +1,14 @@
+/**
+\mainpage
+\htmlinclude manifest.html
+
+\b testbench_tools
+
+<!--
+Provide an overview of your package.
+-->
+
+-->
+
+
+*/
View
16 ihe_benchmark/testbench/manifest.xml
@@ -0,0 +1,16 @@
+<package>
+ <description brief="testbench">
+ ROS Performance Testbench
+ </description>
+ <author>I Heart Engineering</author>
+ <license>BSD</license>
+ <review status="unreviewed" notes=""/>
+ <url>http://ros.org/wiki/testbench</url>
+ <depend package="roscpp"/>
+ <depend package="pluginlib"/>
+ <export>
+ <cpp cflags="-I${prefix}/include" />
+ </export>
+</package>
+
+
View
29 ihe_benchmark/testbench/src/test_loader.cpp
@@ -0,0 +1,29 @@
+#include <pluginlib/class_loader.h>
+#include <testbench/test_base.h>
+
+int main(int argc, char** argv)
+{
+ pluginlib::ClassLoader<test_base::Test> test_loader("testbench", "test_base::Test");
+
+ test_base::Test* random_test = NULL;
+ test_base::Test* primes_test = NULL;
+
+ try
+ {
+ random_test = test_loader.createClassInstance("testbench/test_random");
+ random_test->initialize();
+
+ primes_test = test_loader.createClassInstance("testbench/test_primes");
+ primes_test->initialize();
+
+ ROS_INFO("Random Test: %.6f", random_test->run());
+ ROS_INFO("Primes Test: %.6f", primes_test->run());
+
+ }
+ catch(pluginlib::PluginlibException& ex)
+ {
+ ROS_ERROR("The plugin failed to load for some reason. Error: %s", ex.what());
+ }
+
+ return 0;
+}
Please sign in to comment.
Something went wrong with that request. Please try again.