Commit 7483990d authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

[Tests] use example-robot-data

parent 1e9e3fa2
# Make Boost.Test generates the main function in test cases.
ADD_DEFINITIONS(-DBOOST_TEST_DYN_LINK -DBOOST_TEST_MAIN)
SET(urdfpath ${SIMPLE_HUMANOID_DESCRIPTION_PKGDATAROOTDIR}/simple_humanoid_description/urdf/simple_humanoid.urdf)
# Add unit tests for validation
MACRO(SOT_TOR_CTR_TEST NAME)
ADD_UNIT_TEST(test-${NAME} test-${NAME}.cpp)
TARGET_LINK_LIBRARIES(test-${NAME} PRIVATE ${PROJECT_NAME} Boost::unit_test_framework ${NAME}
dynamic-graph::dynamic-graph pinocchio::pinocchio)
TARGET_COMPILE_DEFINITIONS(test-${NAME} PUBLIC URDF_FULL_PATH="${urdfpath}")
dynamic-graph::dynamic-graph pinocchio::pinocchio example-robot-data::example-robot-data)
ENDMACRO(SOT_TOR_CTR_TEST)
SOT_TOR_CTR_TEST(control-manager)
......
......@@ -7,6 +7,8 @@
#include <sstream>
#include <iostream>
#include <example-robot-data/path.hpp>
#include <dynamic-graph/factory.h>
// Needed for sendMsg.
......@@ -35,7 +37,7 @@ BOOST_AUTO_TEST_CASE(testControlManager) {
a_control_manager.setLoggerVerbosityLevel(dynamicgraph::VERBOSITY_ALL);
std::string robotRef("simple_humanoid_description");
a_control_manager.init(0.001, URDF_FULL_PATH, robotRef);
a_control_manager.init(0.001, EXAMPLE_ROBOT_DATA_MODEL_DIR "/simple_humanoid_description/urdf/simple_humanoid.urdf", robotRef);
dynamicgraph::Vector av;
a_control_manager.m_uSOUT.needUpdate(6);
......
Markdown is supported
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