Commit ba9e39bc authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Fix model-loader.cc and update CMakeLists.txt

parent 6a2e9e66
......@@ -85,8 +85,6 @@ IF(HPP_MODEL_FOUND)
include/hpp/pinocchio/hpp-model/conversions.hh
include/hpp/pinocchio/hpp-model/model-loader.hh
)
config_files(src/hpp-model/model-loader.cc)
ENDIF(HPP_MODEL_FOUND)
ADD_SUBDIRECTORY(src)
......
......@@ -29,7 +29,7 @@ SET(LIBRARY_SOURCES
)
IF(HPP_MODEL_FOUND)
LIST(APPEND LIBRARY_SOURCES ${CMAKE_CURRENT_BINARY_DIR}/hpp-model/model-loader.cc)
LIST(APPEND LIBRARY_SOURCES hpp-model/model-loader.cc)
ENDIF(HPP_MODEL_FOUND)
#Adding headers to sources for visibility in IDE
......@@ -42,6 +42,10 @@ ADD_LIBRARY(${LIBRARY_NAME}
${LIBRARY_SOURCES}
)
IF(HPP_MODEL_FOUND)
SET_PROPERTY(TARGET ${LIBRARY_NAME} APPEND_STRING PROPERTY COMPILE_FLAGS " -DROMEO_MODEL_DIR=\\\"${ROMEO_DESCRIPTION_DATAROOTDIR}\\\"")
ENDIF(HPP_MODEL_FOUND)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} assimp)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-util)
PKG_CONFIG_USE_DEPENDENCY(${LIBRARY_NAME} hpp-fcl)
......
......@@ -19,7 +19,7 @@
/* Default path of the urdf file describing the robot to parse. */
const std::string urdfDefaultFilename =
"@ROMEO_DESCRIPTION_DATAROOTDIR@/romeo_description/urdf/romeo_small.urdf";
ROMEO_MODEL_DIR "/romeo_description/urdf/romeo_small.urdf";
/* Build a hpp::pinocchio::Device from urdf path. */
hpp::pinocchio::DevicePtr_t hppPinocchio( bool withGeoms, const std::string urdfFilename)
......@@ -35,7 +35,7 @@ hpp::pinocchio::DevicePtr_t hppPinocchio( bool withGeoms, const std::string urdf
std::vector<std::string> baseDirs; baseDirs.push_back("@ROMEO_DESCRIPTION_DATAROOTDIR@");
hpp::pinocchio::GeomModelPtr_t geom( new se3::GeometryModel() );
se3::GeometryModel & geomRef = *geom;
geomRef = se3::urdf::buildGeom(*pinocchio->model(),pinocchio->name(),baseDirs,se3::COLLISION);
geomRef = se3::urdf::buildGeom(pinocchio->model(),pinocchio->name(),baseDirs,se3::COLLISION);
pinocchio->geomModel(geom);
pinocchio->createGeomData();
......
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