Verified Commit a4d21906 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

test: fix model path

parent 8b0d1471
......@@ -14,12 +14,12 @@
int main(int /*argc*/, char ** /*argv*/)
{
using namespace pinocchio;
const std::string robots_model_path = PINOCCHIO_MODEL_DIR + std::string("/example-robot-data/robots/");
const std::string robots_model_path = PINOCCHIO_MODEL_DIR;
// You should change here to set up your own URDF file
const std::string urdf_filename = robots_model_path + std::string("talos_data/urdf/talos_reduced.urdf");
const std::string urdf_filename = robots_model_path + std::string("/example-robot-data/robots/talos_data/urdf/talos_reduced.urdf");
// You should change here to set up your own SRDF file
const std::string srdf_filename = robots_model_path + std::string("talos_data/srdf/talos.srdf");
const std::string srdf_filename = robots_model_path + std::string("/example-robot-data/robots/talos_data/srdf/talos.srdf");
// Load the URDF model contained in urdf_filename
Model model;
......
......@@ -17,7 +17,7 @@ int main(int argc, char ** argv)
using namespace pinocchio;
const std::string model_path = (argc<=1) ? PINOCCHIO_MODEL_DIR + std::string("/example-robot-data/robots") : argv[1];
const std::string mesh_dir = model_path;
const std::string mesh_dir = (argc<=1) ? PINOCCHIO_MODEL_DIR : argv[1];
const std::string urdf_filename = model_path + "/ur_description/urdf/ur5_robot.urdf";
// Load the urdf model
......
......@@ -127,7 +127,7 @@ BOOST_AUTO_TEST_CASE ( loading_model )
std::string filename = PINOCCHIO_MODEL_DIR + std::string("/example-robot-data/robots/romeo_description/urdf/romeo_small.urdf");
std::vector < std::string > packageDirs;
std::string meshDir = PINOCCHIO_MODEL_DIR + std::string("/example-robot-data/robots/");
std::string meshDir = PINOCCHIO_MODEL_DIR;
packageDirs.push_back(meshDir);
Model model;
......@@ -164,7 +164,7 @@ BOOST_AUTO_TEST_CASE(manage_collision_pairs)
std::string filename = PINOCCHIO_MODEL_DIR + std::string("/example-robot-data/robots/romeo_description/urdf/romeo_small.urdf");
std::vector < std::string > package_dirs;
std::string mesh_dir = PINOCCHIO_MODEL_DIR + std::string("/example-robot-data/robots/");
std::string mesh_dir = PINOCCHIO_MODEL_DIR;
package_dirs.push_back(mesh_dir);
Model model;
......@@ -310,7 +310,7 @@ BOOST_AUTO_TEST_CASE ( test_collisions )
const std::string filename = PINOCCHIO_MODEL_DIR + std::string("/example-robot-data/robots/romeo_description/urdf/romeo_small.urdf");
std::vector < std::string > packageDirs;
const std::string meshDir = PINOCCHIO_MODEL_DIR + std::string("/example-robot-data/robots/");
const std::string meshDir = PINOCCHIO_MODEL_DIR;
packageDirs.push_back(meshDir);
const std::string srdf_filename = PINOCCHIO_MODEL_DIR + std::string("/example-robot-data/robots/romeo_description/srdf/romeo.srdf");
......@@ -372,7 +372,7 @@ BOOST_AUTO_TEST_CASE ( test_distances )
const std::string filename = PINOCCHIO_MODEL_DIR + std::string("/example-robot-data/robots/romeo_description/urdf/romeo_small.urdf");
std::vector < std::string > packageDirs;
const std::string meshDir = PINOCCHIO_MODEL_DIR + std::string("/example-robot-data/robots/");
const std::string meshDir = PINOCCHIO_MODEL_DIR;
packageDirs.push_back(meshDir);
const std::string srdf_filename = PINOCCHIO_MODEL_DIR + std::string("/example-robot-data/robots/romeo_description/srdf/romeo.srdf");
......@@ -407,7 +407,7 @@ BOOST_AUTO_TEST_CASE ( test_append_geom_models )
const std::string filename = PINOCCHIO_MODEL_DIR + std::string("/example-robot-data/robots/romeo_description/urdf/romeo_small.urdf");
std::vector < std::string > packageDirs;
const std::string meshDir = PINOCCHIO_MODEL_DIR + std::string("/example-robot-data/robots/");
const std::string meshDir = PINOCCHIO_MODEL_DIR;
packageDirs.push_back(meshDir);
Model model;
......@@ -436,7 +436,7 @@ BOOST_AUTO_TEST_CASE (radius)
std::vector < std::string > packageDirs;
std::string filename = PINOCCHIO_MODEL_DIR + std::string("/example-robot-data/robots/romeo_description/urdf/romeo_small.urdf");
std::string meshDir = PINOCCHIO_MODEL_DIR + std::string("/example-robot-data/robots/");
std::string meshDir = PINOCCHIO_MODEL_DIR;
packageDirs.push_back(meshDir);
pinocchio::Model model;
......
......@@ -20,7 +20,7 @@ BOOST_AUTO_TEST_CASE(test_removeCollisionPairs)
using namespace pinocchio::urdf;
using namespace pinocchio::srdf;
const string model_filename = PINOCCHIO_MODEL_DIR + std::string("/example-robot-data/robots/romeo_description/urdf/romeo_small.urdf");
const string model_dir = PINOCCHIO_MODEL_DIR + std::string("/example-robot-data/robots");
const string model_dir = PINOCCHIO_MODEL_DIR;
const string srdf_filename = PINOCCHIO_MODEL_DIR + std::string("/example-robot-data/robots/romeo_description/srdf/romeo.srdf");
Model model;
......
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