Commit f75590ee authored by Olivier Stasse's avatar Olivier Stasse
Browse files

[tests] Update tests.

parent 962714f8
Pipeline #10881 failed with stage
in 2 minutes and 48 seconds
......@@ -7,5 +7,22 @@ ADD_DEFINITIONS(-DDEBUG=2)
ADD_UNIT_TEST(main_test main.cc)
TARGET_LINK_LIBRARIES(main_test
jrl-walkgen::jrl-walkgen
sot-core::sot-core
next-step
next-step-pg-sot
step-checker
step-computer-joystick
step-observer
step-queue
step-time-line
which-foot-upper
pg
pg-manager
)
SET(urdfpath ${TALOS_DATA_PREFIX}/share/talos_data/urdf/talos_full_v2.urdf)
TARGET_COMPILE_DEFINITIONS(main_test PUBLIC
URDF_FULL_PATH="${urdfpath}" )
......@@ -105,26 +105,10 @@ int main(int, char**) {
using namespace std;
dynamicgraph::sot::PatternGenerator aPG;
// Get environment variable CMAKE_PREFIX_PATH
const string s_cmake_prefix_path = getenv( "CMAKE_PREFIX_PATH" );
// Read the various paths
vector<string> paths;
boost::split(paths, s_cmake_prefix_path, boost::is_any_of(":;"));
// Search talos_reduced_wpg.urdf
string filename="";
for (auto test_path : paths)
{
filename = test_path +
string("/share/talos_data/urdf/talos_full_v2.urdf");
if ( boost::filesystem::exists(filename))
break;
}
// If not found fails
if (filename.size()==0)
string filename(URDF_FULL_PATH);
if (!boost::filesystem::exists(filename))
{
cerr << "Unable to find talos_reduced_wpg.urdf" << endl;
exit(-1);
......
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