From 2e346b0ff0dfac899c83d239ffd74acd18059f3a Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 3 Apr 2016 21:09:48 -0700 Subject: [PATCH] bm - change the muscle order in ICRA2015 tests based on the updated builder tools --- test_integration/ICRA2015Tests/CMakeLists.txt | 28 ++++++------------- .../ICRA2015Tests/ICRA2015_test.cpp | 28 +++++++++---------- 2 files changed, 22 insertions(+), 34 deletions(-) diff --git a/test_integration/ICRA2015Tests/CMakeLists.txt b/test_integration/ICRA2015Tests/CMakeLists.txt index df1d79edd..0b230c855 100644 --- a/test_integration/ICRA2015Tests/CMakeLists.txt +++ b/test_integration/ICRA2015Tests/CMakeLists.txt @@ -3,23 +3,11 @@ link_directories(${ENV_LIB_DIR} ${NTRT_BUILD_DIR}) link_libraries( tgOpenGLSupport) -#add_executable(ICRA2015_test -# ICRA2015_test.cpp) - -#target_link_libraries(ICRA2015_test ${ENV_LIB_DIR}/libgtest.a pthread -# ${NTRT_BUILD_DIR}/core/libcore.so -# ${NTRT_BUILD_DIR}/helpers/libFileHelpers.so -# ${NTRT_BUILD_DIR}/examples/learningSpines/liblearningSpines.so -# ${NTRT_BUILD_DIR}/dev/btietz/TetraSpineStatic/libtetraSpineHardware.so) - -# Temporary test that replaces ICRA2015_test while github issue 191 is worked on. -# This is the same test as ICRA2015_test but uses a model that defines muscle pairs in a -# different order (see github issue 191 for more details). -add_executable(ICRA2015_pair_ordering_test - ICRA2015_pair_ordering_test.cpp) - -target_link_libraries(ICRA2015_pair_ordering_test ${ENV_LIB_DIR}/libgtest.a pthread - ${NTRT_BUILD_DIR}/core/libcore.so - ${NTRT_BUILD_DIR}/helpers/libFileHelpers.so - ${NTRT_BUILD_DIR}/examples/learningSpines/liblearningSpines.so - ${NTRT_BUILD_DIR}/dev/btietz/TetraSpineStatic/libtetraSpineHardware.so) \ No newline at end of file +add_executable(ICRA2015_test + ICRA2015_test.cpp) + +target_link_libraries(ICRA2015_test ${ENV_LIB_DIR}/libgtest.a pthread + ${NTRT_BUILD_DIR}/core/libcore.so + ${NTRT_BUILD_DIR}/helpers/libFileHelpers.so + ${NTRT_BUILD_DIR}/examples/learningSpines/liblearningSpines.so + ${NTRT_BUILD_DIR}/dev/btietz/TetraSpineStatic/libtetraSpineHardware.so) diff --git a/test_integration/ICRA2015Tests/ICRA2015_test.cpp b/test_integration/ICRA2015Tests/ICRA2015_test.cpp index 619369d35..72505304f 100644 --- a/test_integration/ICRA2015Tests/ICRA2015_test.cpp +++ b/test_integration/ICRA2015Tests/ICRA2015_test.cpp @@ -130,23 +130,23 @@ namespace { * as of 2/28/15. Try to make them smaller! */ double error; - std::cout << "Inner front top max tension " << simMaxTens[1] / 100.0 << " N" << std::endl; - error = abs ((34.3954 - simMaxTens[1] / 100.0) / 34.3954); + std::cout << "Inner front top max tension " << simMaxTens[5] / 100.0 << " N" << std::endl; + error = abs ((34.3954 - simMaxTens[5] / 100.0) / 34.3954); EXPECT_LE(error, 0.06); - std::cout << "Inner front left max tension " << simMaxTens[5] / 100.0 << " N" << std::endl; - error = abs ((18.0986 - simMaxTens[5] / 100.0) / 18.0986); + std::cout << "Inner front left max tension " << simMaxTens[4] / 100.0 << " N" << std::endl; + error = abs ((18.0986 - simMaxTens[4] / 100.0) / 18.0986); EXPECT_LE(error, 0.0715); - std::cout << "Inner front right max tension " << simMaxTens[9] / 100.0 << " N" << std::endl; - error = abs ((22.0161 - simMaxTens[9] / 100.0) / 22.0161); - EXPECT_LE(error, 0.06); - std::cout << "Outer front top max tension " << simMaxTens[0] / 100.0 << " N" << std::endl; - error = abs ((24.6800 - simMaxTens[0] / 100.0) / 24.6800); + std::cout << "Inner front right max tension " << simMaxTens[3] / 100.0 << " N" << std::endl; + error = abs ((22.0161 - simMaxTens[3] / 100.0) / 22.0161); + EXPECT_LE(error, 0.0601); + std::cout << "Outer front top max tension " << simMaxTens[2] / 100.0 << " N" << std::endl; + error = abs ((24.6800 - simMaxTens[2] / 100.0) / 24.6800); EXPECT_LE(error, 0.19); - std::cout << "Outer front left max tension " << simMaxTens[4] / 100.0 << " N" << std::endl; - error = abs ((15.5914 - simMaxTens[4] / 100.0) / 15.5914); - EXPECT_LE(error, 0.35); - std::cout << "Outer front right max tension " << simMaxTens[8] / 100.0 << " N" << std::endl; - error = abs ((14.1811 - simMaxTens[8] / 100.0) / 14.1811); + std::cout << "Outer front left max tension " << simMaxTens[1] / 100.0 << " N" << std::endl; + error = abs ((15.5914 - simMaxTens[1] / 100.0) / 15.5914); + EXPECT_LE(error, 0.3501); + std::cout << "Outer front right max tension " << simMaxTens[0] / 100.0 << " N" << std::endl; + error = abs ((14.1811 - simMaxTens[0] / 100.0) / 14.1811); EXPECT_LE(error, 0.2251); /** @todo test median tension as well, also maybe sum of errors **/