Unverified Commit a3e02b65 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by GitHub
Browse files

Merge pull request #63 from humanoid-path-planner/device_for_unit_test

Fix creation of devices for unit tests
parents 8ba9fb49 2597184b
......@@ -51,13 +51,6 @@ ADD_LIBRARY(${LIBRARY_NAME}
${LIBRARY_SOURCES}
)
IF(ROMEO_DESCRIPTION_FOUND)
SET_PROPERTY(TARGET ${LIBRARY_NAME} APPEND_STRING PROPERTY COMPILE_FLAGS " -DROMEO_DESCRIPTION")
ENDIF(ROMEO_DESCRIPTION_FOUND)
IF(HPP_ENVIRONMENTS_FOUND)
SET_PROPERTY(TARGET ${LIBRARY_NAME} APPEND_STRING PROPERTY COMPILE_FLAGS " -DHPP_ENVIRONMENTS")
ENDIF(HPP_ENVIRONMENTS_FOUND)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} assimp)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-util)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-fcl)
......
......@@ -52,7 +52,6 @@ namespace hpp {
{
(void)prefix;
switch (type) {
#ifdef HPP_ENVIRONMENTS
case CarLike:
{
DevicePtr_t robot = Device::create("carlike");
......@@ -70,14 +69,7 @@ namespace hpp {
"_simple", "_simple");
return robot;
}
#else
case CarLike:
case ManipulatorArm2:
throw std::invalid_argument("hpp-pinocchio was compiled without HPP_ENVIRONMENTS");
#endif
break;
case HumanoidRomeo:
#ifdef ROMEO_DESCRIPTION
{
HumanoidRobotPtr_t robot = HumanoidRobot::create("romeo");
urdf::loadRobotModel (robot, 0, prefix, "freeflyer",
......@@ -88,10 +80,6 @@ namespace hpp {
robot->model().upperPositionLimit.head<3>().setOnes();
return robot;
}
#else
throw std::invalid_argument("hpp-pinocchio was compiled without ROMEO_DESCRIPTION");
#endif
break;
default:
throw std::invalid_argument("Unknown robot type.");
}
......
......@@ -59,11 +59,7 @@ ENDMACRO(ADD_TESTCASE_CFLAGS)
IF(ROMEO_DESCRIPTION_FOUND)
ADD_TESTCASE(tconfiguration FALSE)
ADD_TESTCASE_CFLAGS(tconfiguration
'-DROMEO_MODEL_DIR=\\\"${ROMEO_DESCRIPTION_DATAROOTDIR}\\\"')
ADD_TESTCASE(frame FALSE)
ADD_TESTCASE(device FALSE)
ENDIF(ROMEO_DESCRIPTION_FOUND)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment