diff --git a/CMakeLists.txt b/CMakeLists.txt index 5582e5dafef4e40dd3187a1db76df5bce439662a..57feacfdee2ee4ed81c63c796592a883d85a3fa1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,44 +1,164 @@ -cmake_minimum_required(VERSION 2.4.6) -include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake) +cmake_minimum_required(VERSION 2.8.3) +project(iri_segway_rmp200) -set(PROJECT_NAME segway_rmp200_driver_node) +## Find catkin macros and libraries +## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) +## is used, also find other catkin packages +find_package(catkin REQUIRED) +find_package(catkin REQUIRED COMPONENTS iri_base_driver iri_segway_rmp_msgs geometry_msgs) -# Set the build type. Options are: -# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage -# Debug : w/ debug symbols, w/o optimization -# Release : w/o debug symbols, w/ optimization -# RelWithDebInfo : w/ debug symbols, w/ optimization -# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries -#set(ROS_BUILD_TYPE RelWithDebInfo) +## System dependencies are found with CMake's conventions +# find_package(Boost REQUIRED COMPONENTS system) -rosbuild_init() +## Uncomment this if the package has a setup.py. This macro ensures +## modules and global scripts declared therein get installed +## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html +# catkin_python_setup() -#set the default path for built executables to the "bin" directory -set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin) -#set the default path for built libraries to the "lib" directory -set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib) +################################################ +## Declare ROS messages, services and actions ## +################################################ -#uncomment if you have defined messages -#rosbuild_genmsg() -#uncomment if you have defined services -#rosbuild_gensrv() +## To declare and build messages, services or actions from within this +## package, follow these steps: +## * Let MSG_DEP_SET be the set of packages whose message types you use in +## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). +## * In the file package.xml: +## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET +## * If MSG_DEP_SET isn't empty the following dependencies might have been +## pulled in transitively but can be declared for certainty nonetheless: +## * add a build_depend tag for "message_generation" +## * add a run_depend tag for "message_runtime" +## * In this file (CMakeLists.txt): +## * add "message_generation" and every package in MSG_DEP_SET to +## find_package(catkin REQUIRED COMPONENTS ...) +## * add "message_runtime" and every package in MSG_DEP_SET to +## catkin_package(CATKIN_DEPENDS ...) +## * uncomment the add_*_files sections below as needed +## and list every .msg/.srv/.action file to be processed +## * uncomment the generate_messages entry below +## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) -# added to include support for dynamic reconfiguration -rosbuild_find_ros_package(dynamic_reconfigure) -include(${dynamic_reconfigure_PACKAGE_PATH}/cmake/cfgbuild.cmake) -gencfg() -# end dynamic reconfiguration +## Generate messages in the 'msg' folder +# add_message_files( +# FILES +# Message1.msg +# Message2.msg +# ) + +## Generate services in the 'srv' folder +# add_service_files( +# FILES +# Service1.srv +# Service2.srv +# ) + +## Generate actions in the 'action' folder +# add_action_files( +# FILES +# Action1.action +# Action2.action +# ) + +## Generate added messages and services with any dependencies listed here +# generate_messages( +# DEPENDENCIES +# std_msgs # Or other packages containing msgs +# ) +generate_dynamic_reconfigure_options(cfg/SegwayRMP200.cfg) + +################################### +## catkin specific configuration ## +################################### +## The catkin_package macro generates cmake config files for your package +## Declare things to be passed to dependent projects +## INCLUDE_DIRS: uncomment this if you package contains header files +## LIBRARIES: libraries you create in this project that dependent projects also need +## CATKIN_DEPENDS: catkin_packages dependent projects also need +## DEPENDS: system dependencies of this project that dependent projects also need +catkin_package( +# INCLUDE_DIRS include +# LIBRARIES + CATKIN_DEPENDS iri_base_driver iri_segway_rmp_msgs + DEPENDS iriutils comm segway_rmp200 +) + +########### +## Build ## +########### FIND_PACKAGE(iriutils REQUIRED) FIND_PACKAGE(comm REQUIRED) FIND_PACKAGE(segway_rmp_200 REQUIRED) -INCLUDE_DIRECTORIES(${iriutils_INCLUDE_DIR} ${comm_INCLUDE_DIR} ${segway_rmp_200_INCLUDE_DIR} ./include) +## Specify additional locations of header files +## Your package locations should be listed before other locations +include_directories(include) +include_directories(${catkin_INCLUDE_DIRS}) +include_directories(${iriutils_INCLUDE_DIR}) +include_directories(${comm_INCLUDE_DIR}) +include_directories(${segway_rmp_200_INCLUDE_DIR}) + +## Declare a cpp library +# add_library(foo +# src/${PROJECT_NAME}/foo.cpp +# ) + +## Declare a cpp executable +add_executable(${PROJECT_NAME} src/segway_rmp200_driver.cpp src/segway_rmp200_driver_node.cpp) + +## Add cmake target dependencies of the executable/library +## as an example, message headers may need to be generated before nodes +# add_dependencies(foo_node foo_generate_messages_cpp) +add_dependencies(${PROJECT_NAME} iri_segway_rmp_msgs_cpp) + +## Specify libraries to link a library or executable target against +target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${iriutils_LIBRARY} ${comm_LIBRARY} ${segway_rmp_200_LIBRARY}) + +############# +## Install ## +############# + +# all install targets should use catkin DESTINATION variables +# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html + +## Mark executable scripts (Python etc.) for installation +## in contrast to setup.py, you can choose the destination +# install(PROGRAMS +# scripts/my_python_script +# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +# ) + +## Mark executables and/or libraries for installation +# install(TARGETS foo foo_node +# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} +# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} +# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +# ) + +## Mark cpp header files for installation +# install(DIRECTORY include/${PROJECT_NAME}/ +# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} +# FILES_MATCHING PATTERN "*.h" +# PATTERN ".svn" EXCLUDE +# ) + +## Mark other files for installation (e.g. launch and bag files, etc.) +# install(FILES +# # myfile1 +# # myfile2 +# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +# ) + +############# +## Testing ## +############# -#common commands for building c++ executables and libraries -#rosbuild_add_library(${PROJECT_NAME} src/example.cpp) -#rosbuild_add_boost_directories() -#rosbuild_link_boost(${PROJECT_NAME} thread) -rosbuild_add_executable(${PROJECT_NAME} src/segway_rmp200_driver.cpp src/segway_rmp200_driver_node.cpp) +## Add gtest based cpp test target and link libraries +# catkin_add_gtest(${PROJECT_NAME}-test test/test_foo.cpp) +# if(TARGET ${PROJECT_NAME}-test) +# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) +# endif() -target_link_libraries(${PROJECT_NAME} ${iriutils_LIBRARY} ${comm_LIBRARY} ${segway_rmp_200_LIBRARY}) +## Add folders to be run by python nosetests +# catkin_add_nosetests(test) diff --git a/Makefile b/Makefile deleted file mode 100644 index b75b928f20ef9ea4f509a17db62e4e31b422c27f..0000000000000000000000000000000000000000 --- a/Makefile +++ /dev/null @@ -1 +0,0 @@ -include $(shell rospack find mk)/cmake.mk \ No newline at end of file diff --git a/cfg/segway_rmp200_driver_config.cfg b/cfg/SegwayRMP200.cfg similarity index 97% rename from cfg/segway_rmp200_driver_config.cfg rename to cfg/SegwayRMP200.cfg index 6bc1208af74a77d88cd88576c791517c0eb09bb7..17549749e9a2dea54432da87652be3355232649b 100755 --- a/cfg/segway_rmp200_driver_config.cfg +++ b/cfg/SegwayRMP200.cfg @@ -32,10 +32,9 @@ # Author: PACKAGE='iri_segway_rmp200' -import roslib; roslib.load_manifest(PACKAGE) from driver_base.msg import SensorLevels -from dynamic_reconfigure.parameter_generator import * +from dynamic_reconfigure.parameter_generator_catkin import * gen = ParameterGenerator() diff --git a/manifest.xml b/manifest.xml deleted file mode 100644 index 44343e350a799cd1eaf0a1e8822cdb71034bde71..0000000000000000000000000000000000000000 --- a/manifest.xml +++ /dev/null @@ -1,21 +0,0 @@ -<package> - <description brief="iri_segway_rmp200"> - - iri_segway_rmp200 - - </description> - <author>IRI Lab</author> - <license>LGPL</license> - <review status="unreviewed" notes=""/> - <url>http://ros.org/wiki/iri_segway_rmp200</url> - <depend package="roscpp"/> - <depend package="iri_base_driver"/> - <depend package="geometry_msgs"/> - <depend package="iri_segway_rmp_msgs"/> - - <!-- This is needed so RMP400 can use namespace functions --> - <export> - <cpp cflags="-I${prefix}/include"/> - </export> - -</package> diff --git a/package.xml b/package.xml new file mode 100644 index 0000000000000000000000000000000000000000..91c28a159855a755b0a7156eb14eaefff48f7a8b --- /dev/null +++ b/package.xml @@ -0,0 +1,55 @@ +<?xml version="1.0"?> +<package> + <name>iri_segway_rmp200</name> + <version>1.0.0</version> + <description>Segway RMP200 driver ROS wrapper</description> + + <!-- One maintainer tag required, multiple allowed, one person per tag --> + <!-- Example: --> + <maintainer email="shernand@iri.upc.edu">Sergi Hernandez</maintainer> --> + + <!-- One license tag required, multiple allowed, one license per tag --> + <!-- Commonly used license strings: --> + <!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 --> + <license>LGPL</license> + + + <!-- Url tags are optional, but mutiple are allowed, one per tag --> + <!-- Optional attribute type can be: website, bugtracker, or repository --> + <!-- Example: --> + <url type="website">http://wiki.ros.org/iri_segway_rmp200</url> + + + <!-- Author tags are optional, mutiple are allowed, one per tag --> + <!-- Authors do not have to be maintianers, but could be --> + <!-- Example: --> + <author email="shernand@iri.upc.edu">Sergi Hernandez</author> --> + + + <!-- The *_depend tags are used to specify dependencies --> + <!-- Dependencies can be catkin packages or system dependencies --> + <!-- Examples: --> + <!-- Use build_depend for packages you need at compile time: --> + <build_depend>iri_base_driver</build_depend> + <build_depend>iri_segway_rmp_msgs</build_depend> + <build_depend>geometry_msgs</build_depend> + <!-- Use buildtool_depend for build tool packages: --> + <!-- <buildtool_depend>catkin</buildtool_depend> --> + <!-- Use run_depend for packages you need at runtime: --> + <run_depend>iri_base_driver</run_depend> + <run_depend>iri_segway_rmp_msgs</run_depend> + <run_depend>geometry_msgs</run_depend> + <!-- Use test_depend for packages you need only for testing: --> + <!-- <test_depend>gtest</test_depend> --> + <buildtool_depend>catkin</buildtool_depend> + + + <!-- The export tag contains other, unspecified, tags --> + <export> + <!-- You can specify that this package is a metapackage here: --> + <!--<metapackage/>--> + + <!-- Other tools can request additional information be placed here --> + + </export> +</package>