Commit 088fe728 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Fix packaging issues (no dep with hpp-model)

parent 4a934ff5
......@@ -44,7 +44,9 @@ MACRO(ADD_TESTCASE NAME GENERATED)
TARGET_LINK_LIBRARIES(${NAME}
${Boost_LIBRARIES}
${PROJECT_NAME})
PKG_CONFIG_USE_DEPENDENCY(${NAME} hpp-model-urdf)
IF(HPP_MODEL_FOUND)
PKG_CONFIG_USE_DEPENDENCY(${NAME} hpp-model-urdf)
ENDIF(HPP_MODEL_FOUND)
PKG_CONFIG_USE_DEPENDENCY(${NAME} pinocchio)
ENDMACRO(ADD_TESTCASE)
......@@ -55,7 +57,7 @@ ENDMACRO(ADD_TESTCASE_CFLAGS)
# --- LIST OF TESTS ------------------------------------------------------------
# --- LIST OF TESTS ------------------------------------------------------------
# --- LIST OF TESTS ------------------------------------------------------------
IF(ROMEO_DESCRIPTION_FOUND)
IF(HPP_MODEL_FOUND AND ROMEO_DESCRIPTION_FOUND)
MESSAGE(STATUS "=== Tests with romeo" ${ROMEO_DESCRIPTION_DATAROOTDIR})
ADD_TESTCASE(tfakecontainer FALSE)
......@@ -83,8 +85,10 @@ IF(ROMEO_DESCRIPTION_FOUND)
ADD_TESTCASE_CFLAGS(tcenter-of-mass
'-DROMEO_MODEL_DIR=\\\"${ROMEO_DESCRIPTION_DATAROOTDIR}\\\"')
ENDIF(HPP_MODEL_FOUND AND ROMEO_DESCRIPTION_FOUND)
IF(ROMEO_DESCRIPTION_FOUND)
ADD_TESTCASE(frame FALSE)
ADD_TESTCASE_CFLAGS(frame
'-DROMEO_MODEL_DIR=\\\"${ROMEO_DESCRIPTION_DATAROOTDIR}\\\"')
ENDIF(ROMEO_DESCRIPTION_FOUND)
......@@ -18,14 +18,13 @@
#include <boost/test/unit_test.hpp>
#include <hpp/model/device.hh>
#include <pinocchio/algorithm/frames.hpp>
#include <hpp/pinocchio/joint.hh>
#include <hpp/pinocchio/device.hh>
#include <hpp/pinocchio/humanoid-robot.hh>
#include <hpp/pinocchio/frame.hh>
#include "../tests/utils.hh"
#include <hpp/pinocchio/urdf/util.hh>
static bool verbose = false;
......@@ -51,6 +50,19 @@ void check_children(const Model& model, const Frame& f, Strings_t expected_child
}
}
/* Build a hpp::pinocchio::Device from urdf path. */
DevicePtr_t hppPinocchio()
{
HumanoidRobotPtr_t robot = HumanoidRobot::create("romeo");
urdf::loadHumanoidModel (robot,
"freeflyer",
"romeo_description",
"romeo",
"_small",
"_small");
return robot;
}
BOOST_AUTO_TEST_CASE (frame)
{
DevicePtr_t pinocchio = hppPinocchio();
......
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