Skip to content

Commit

Permalink
bm - change the muscle order in ICRA2015 tests based on the updated b…
Browse files Browse the repository at this point in the history
…uilder tools
  • Loading branch information
brtietz committed Apr 4, 2016
1 parent 19397ed commit 2e346b0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 34 deletions.
28 changes: 8 additions & 20 deletions test_integration/ICRA2015Tests/CMakeLists.txt
Expand Up @@ -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)
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)
28 changes: 14 additions & 14 deletions test_integration/ICRA2015Tests/ICRA2015_test.cpp
Expand Up @@ -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 **/
Expand Down

0 comments on commit 2e346b0

Please sign in to comment.