diff --git a/CMakeLists.txt b/CMakeLists.txt index bbd538f760a7c46b645de16fb564001384b22006..055ede90fe3d1cab23f85334c0573fa6331c9284 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,7 @@ endif(COMMAND cmake_policy) # The project name and the type of project PROJECT(segway_rmp_200) +SET(PACKAGE_NAME segway-rmp-200) SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/bin) SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib) @@ -71,22 +72,25 @@ ELSE(UNIX) ) ENDIF(UNIX) - IF (UNIX) - SET(CPACK_PACKAGE_FILE_NAME "iri-${PROJECT_NAME}-dev-${CPACK_PACKAGE_VERSION}${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}") - SET(CPACK_PACKAGE_NAME "iri-${PROJECT_NAME}-dev") - SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Part of IRI-laboratory libraries. More information at http://wikiri.upc.es/index.php/Robotics_Lab") - SET(CPACK_PACKAGING_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX}) - SET(CPACK_GENERATOR "DEB") - SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "galenya - labrobotica@iri.upc.edu") - SET(CPACK_SET_DESTDIR "ON") # Necessary because of the absolute install paths - SET(CPACK_DEBIAN_PACKAGE_DEPENDS "iri-iriutils-dev (>= 1.0~${DISTRIB}), iri-comm-dev (>= 1.0~${DISTRIB})") - - INCLUDE(CPack) -ELSE(UNIX) - ADD_CUSTOM_COMMAND( - COMMENT "packaging only implemented in unix" - TARGET uninstall - ) -ENDIF(UNIX) - + SET(CPACK_PACKAGE_FILE_NAME "iri-${PACKAGE_NAME}-dev-${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}") + SET(CPACK_PACKAGE_NAME "iri-${PACKAGE_NAME}-dev") + SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Part of IRI-laboratory libraries. More information at https://gitlab.iri.upc.edu/labrobotica") + SET(CPACK_PACKAGING_INSTALL_PREFIX /usr) + SET(CPACK_GENERATOR "DEB") + SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "labrobotica - labrobotica@iri.upc.edu") + + # Uncomment to add the necessary mantainer scripts + # SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_SOURCE_DIR}/scripts/debian/preinst;${CMAKE_SOURCE_DIR}/scripts/debian/postinst;${CMAKE_SOURCE_DIR}/scripts/debian/prerm;${CMAKE_SOURCE_DIR}/scripts/debian/postrm") + + # Uncomment to add dependencies comma separated + # SET(CPACK_DEBIAN_PACKAGE_DEPENDS "iri-<package_name>-dev (>= 1.0~${DISTRIB})") + SET(CPACK_DEBIAN_PACKAGE_DEPENDS "iri-iriutils-dev (>= 1.0~${DISTRIB}), iri-comm-dev (>= 1.0~${DISTRIB})") + + INCLUDE(CPack) + ELSE(UNIX) + ADD_CUSTOM_COMMAND( + COMMENT "packaging only implemented in unix" + TARGET uninstall + ) + ENDIF(UNIX) \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4585b33833c6465aed62834801a44e091a8c1f0b..c6c1b13fde663805e1b6b6a86f9d7448677f1260 100755 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,22 +1,22 @@ # edit the following line to add all the source code files of the library SET(sources segway_rmp200.cpp segway_rmp200_exceptions.cpp) # edit the following line to add all the header files of the library -SET(headers segway_rmp200.h segway_rmp200_exceptions.h) +SET(headers ../include/segway_rmp200.h ../include/segway_rmp200_exceptions.h) # edit the following line to find the necessary packages FIND_PACKAGE(iriutils REQUIRED) FIND_PACKAGE(comm REQUIRED) # edit the following line to add the necessary include directories -INCLUDE_DIRECTORIES(.) -INCLUDE_DIRECTORIES(${iriutils_INCLUDE_DIR}) -INCLUDE_DIRECTORIES(${comm_INCLUDE_DIR}) +INCLUDE_DIRECTORIES(../include) +INCLUDE_DIRECTORIES(${iriutils_INCLUDE_DIRS}) +INCLUDE_DIRECTORIES(${comm_INCLUDE_DIRS}) ADD_LIBRARY(segway_rmp_200 SHARED ${sources}) #edit the following line to add the necessary system libraries (if any) -TARGET_LINK_LIBRARIES(segway_rmp_200 ${iriutils_LIBRARY}) -TARGET_LINK_LIBRARIES(segway_rmp_200 ${comm_LIBRARY}) +TARGET_LINK_LIBRARIES(segway_rmp_200 ${iriutils_LIBRARIES}) +TARGET_LINK_LIBRARIES(segway_rmp_200 ${comm_LIBRARIES}) INSTALL(TARGETS segway_rmp_200 RUNTIME DESTINATION bin diff --git a/src/examples/motionModelData.cpp b/src/examples/motionModelData.cpp index bd92867746ac2e78aa8bda8282af6cbf8e17ff20..a788872b7fb6f258f17050f8bc6c3c7da48aff76 100644 --- a/src/examples/motionModelData.cpp +++ b/src/examples/motionModelData.cpp @@ -65,7 +65,7 @@ int main(int argc, char *argv[]) string fileName = "/home/andreu/Desktop/dataFile.txt"; timeval tvTimeStamp; double timeStamp; - streamsize nn; + //streamsize nn; //user variables float duration; //duration of all the experiment @@ -182,7 +182,7 @@ int main(int argc, char *argv[]) //logging data //cout << (*segway) << endl; - nn=dataFile.precision(15); + //nn=dataFile.precision(15); dataFile << timeStamp << " "; dataFile.precision(6); dataFile << vt << "\t" << vr << "\t"