diff --git a/.travis b/.travis index 092550c1..f6b272c4 160000 --- a/.travis +++ b/.travis @@ -1 +1 @@ -Subproject commit 092550c1770f371fe6e4e07e05ba75040238017e +Subproject commit f6b272c4653f022e04f9627ce85621c1be13406c diff --git a/.travis.yml b/.travis.yml index 0a8dd18c..17a19b6b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,13 @@ -language: - - cpp - - python -python: - - "2.7" -compiler: - - gcc +sudo: required +dist: trusty +language: generic env: - - ROS_DISTRO=hydro ROSWS=wstool BUILDER=catkin USE_DEB=true - - ROS_DISTRO=indigo ROSWS=wstool BUILDER=catkin USE_DEB=true - - ROS_DISTRO=jade ROSWS=wstool BUILDER=catkin USE_DEB=true + - ROS_DISTRO=hydro USE_DEB=true USE_JENKINS=true + - ROS_DISTRO=indigo USE_DEB=true USE_JENKINS=false + - ROS_DISTRO=jade USE_DEB=true USE_JENKINS=false matrix: allow_failures: - - env: ROS_DISTRO=indigo ROSWS=wstool BUILDER=catkin USE_DEB=true - - env: ROS_DISTRO=jade ROSWS=wstool BUILDER=catkin USE_DEB=true + - env: ROS_DISTRO=jade USE_DEB=true script: source .travis/travis.sh before_script: - export ROS_PARALLEL_JOBS="-j2 -l2" diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 28105dd5..00000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -cmake_minimum_required(VERSION 2.4.6) -include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake) - -# Append to CPACK_SOURCE_IGNORE_FILES a semicolon-separated list of -# directories (or patterns, but directories should suffice) that should -# be excluded from the distro. This is not the place to put things that -# should be ignored everywhere, like "build" directories; that happens in -# rosbuild/rosbuild.cmake. Here should be listed packages that aren't -# ready for inclusion in a distro. -# -# This list is combined with the list in rosbuild/rosbuild.cmake. Note -# that CMake 2.6 may be required to ensure that the two lists are combined -# properly. CMake 2.4 seems to have unpredictable scoping rules for such -# variables. -#list(APPEND CPACK_SOURCE_IGNORE_FILES /core/experimental) - -rosbuild_make_distribution(0.1.0) diff --git a/Makefile b/Makefile deleted file mode 100644 index a818ccad..00000000 --- a/Makefile +++ /dev/null @@ -1 +0,0 @@ -include $(shell rospack find mk)/cmake_stack.mk \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000..586164ff --- /dev/null +++ b/README.md @@ -0,0 +1,79 @@ +jsk_openni_kinect +================= + +jsk openni tools + + +## Setup (trusty/inidgo) + + +### Create catkin workspace +``` +$ mkdir-p catkin_ws/ws_jsk_openni_kinect/src +$ cd catkin_ws/ws_jsk_openni_kinect +$ wstool init src +$ wstool set jsk_openni_kinect https://github.com/jsk-ros-pkg/jsk_openni_kinect --git +$ wstool set openni_tracker https://github.com/ros-drivers/openni_tracker --git +$ wstool update +``` + +### Install missing apt package required to run this package +``` +$ rosdep update +$ rosdep install -r -y +``` + +### Create primesense-nite-nonfree and install + +Install patched version of libopenni-sensor-primesense.sh for devices with `ID 1d27:0609 ASUS` +``` +$ ./apt-get-intall-libopenni-sensor-primesense.sh +``` + +Get NITE-Bin-Linux-x64-v1.5.2.23.tar.bz2 from somewhere and put it in this directory +``` +$ ls -al NITE-Bin-Linux-x64-v1.5.2.23.tar.bz2 ## make sure you have NITE-BIN +-rw-rw-r-- 1 k-okada k-okada 108732440 5月 25 20:39 NITE-Bin-Linux-x64-v1.5.2.23.tar.bz2 +$ ./apt-get-intall-primesense-nite-nonfree.sh +``` + +To confirm you have successfully primesense-nite-nonfree, +``` +$ ls -al /usr/include/nite # check if include directory exists +$ ls -al /usr/lib/libXnVNite* # check if library installed +``` + +### Compile openni/nite packages +``` +$ cd catkin_ws/ws_jsk_openni_kinect +$ catkin b +``` + +### Run roslaunch and check if your device run correctly +``` +$ roslaunch openni_launch openni.launch +$ rosrun openni_tracker openni_tracker _camera_frame_id:=camera_depth_frame +``` + + +## Troubleshooting +### Run lsusb and check if your device correctly recognized by your OS +``` +$ lsusb +$ Bus ○○○ Device ○○○: ID 1d27:0601 ASUS +``` +If there is no device like "ASUS", the connected device seems to be broken. + +### Run NiViewer and check if you can run the device without NiTE function +``` +$ NiViewer +``` +If you have some error with this command, I recommend you to try +1. disconnect the device +2. sudo service udev restart +3. connect the device again + +### Run sample program in NITE-Bin-Dev-Linux-x64-v1.5.2.23/Samples/Bin +``` +$ ./Sample-Players +``` diff --git a/apt-get-intall-libopenni-sensor-primesense.diff b/apt-get-intall-libopenni-sensor-primesense.diff new file mode 100644 index 00000000..32f39fb8 --- /dev/null +++ b/apt-get-intall-libopenni-sensor-primesense.diff @@ -0,0 +1,51 @@ +diff -ru openni-sensor-primesense-5.1.0.41/debian/changelog openni-sensor-primesense-5.1.0.41-99/debian/changelog +--- openni-sensor-primesense-5.1.0.41/debian/changelog 2016-05-26 18:59:42.736544744 +0900 ++++ openni-sensor-primesense-5.1.0.41-99/debian/changelog 2016-05-26 18:58:00.300083609 +0900 +@@ -1,3 +1,9 @@ ++openni-sensor-primesense (5.1.0.41-99) unstable; urgency=low ++ ++ * Support 1d27:0609 device ++ ++ -- Kei Okada Tue, 26 May 2016 18:55:55 +0900 ++ + openni-sensor-primesense (5.1.0.41-3) unstable; urgency=low + + [ Jochen Sprickerhof ] +diff -ru openni-sensor-primesense-5.1.0.41/Source/XnDeviceSensorV2/XnDeviceSensorIO.cpp openni-sensor-primesense-5.1.0.41-99/Source/XnDeviceSensorV2/XnDeviceSensorIO.cpp +--- openni-sensor-primesense-5.1.0.41/Source/XnDeviceSensorV2/XnDeviceSensorIO.cpp 2012-01-04 20:43:06.000000000 +0900 ++++ openni-sensor-primesense-5.1.0.41-99/Source/XnDeviceSensorV2/XnDeviceSensorIO.cpp 2016-05-26 18:58:00.308083645 +0900 +@@ -33,6 +33,7 @@ + #define XN_SENSOR_5_0_PRODUCT_ID 0x0500 + #define XN_SENSOR_6_0_PRODUCT_ID 0x0600 + #define XN_SENSOR_6_0_1_PRODUCT_ID 0x0601 ++#define XN_SENSOR_6_0_9_PRODUCT_ID 0x0609 + + //--------------------------------------------------------------------------- + // Enums +@@ -402,6 +403,10 @@ + #else + XnStringsHash devicesSet; + ++ // search for a v6.0.9 device ++ nRetVal = Enumerate(XN_SENSOR_6_0_9_PRODUCT_ID, devicesSet); ++ XN_IS_STATUS_OK(nRetVal); ++ + // search for a v6.0.1 device + nRetVal = Enumerate(XN_SENSOR_6_0_1_PRODUCT_ID, devicesSet); + XN_IS_STATUS_OK(nRetVal); +--- openni-sensor-primesense-5.1.0.41/debian/libopenni-sensor-primesense0.udev 2013-11-30 05:35:50.000000000 +0900 ++++ openni-sensor-primesense-5.1.0.41-99/debian/libopenni-sensor-primesense0.udev 2016-05-26 19:13:22.027791765 +0900 +@@ -5,3 +5,4 @@ + SUBSYSTEM=="usb", ATTR{idProduct}=="0500", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video" + SUBSYSTEM=="usb", ATTR{idProduct}=="0600", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video" + SUBSYSTEM=="usb", ATTR{idProduct}=="0601", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video" ++SUBSYSTEM=="usb", ATTR{idProduct}=="0609", ATTR{idVendor}=="1d27", MODE:="0666", OWNER:="root", GROUP:="video" +diff -ru openni-sensor-primesense-5.1.0.41/Platform/Linux/Install/55-primesense-usb.rules openni-sensor-primesense-5.1.0.41-99/Platform/Linux/Install/55-primesense-usb.rules +--- openni-sensor-primesense-5.1.0.41/Platform/Linux/Install/55-primesense-usb.rules 2012-01-04 20:43:06.000000000 +0900 ++++ openni-sensor-primesense-5.1.0.41-99/Platform/Linux/Install/55-primesense-usb.rules 2016-05-26 19:15:43.172355043 +0900 +@@ -5,4 +5,5 @@ + SYSFS{idProduct}=="0500",SYSFS{idVendor}=="1d27",MODE="666",OWNER="xxx",GROUP="users" + SYSFS{idProduct}=="0600",SYSFS{idVendor}=="1d27",MODE="666",OWNER="xxx",GROUP="users" + SYSFS{idProduct}=="0601",SYSFS{idVendor}=="1d27",MODE="666",OWNER="xxx",GROUP="users" ++SYSFS{idProduct}=="0609",SYSFS{idVendor}=="1d27",MODE="666",OWNER="xxx",GROUP="users" + diff --git a/apt-get-intall-libopenni-sensor-primesense.sh b/apt-get-intall-libopenni-sensor-primesense.sh new file mode 100755 index 00000000..18c60d05 --- /dev/null +++ b/apt-get-intall-libopenni-sensor-primesense.sh @@ -0,0 +1,20 @@ +#!/bin/bash -e +set -x +_THIS_DIR=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd) + +# run everythin within /tmp +cd /tmp +rm -fr openni-sensor-primesense* # make sure we start from clean environment +apt-src install libopenni-sensor-primesense-dev +patch -p0 < ${_THIS_DIR}/apt-get-intall-libopenni-sensor-primesense.diff +apt-src build libopenni-sensor-primesense-dev + +# install +ls -al *.deb +sudo dpkg -i libopenni-sensor-primesense* + +echo "OK" + + + + diff --git a/apt-get-intall-primesense-nite-nonfree.sh b/apt-get-intall-primesense-nite-nonfree.sh new file mode 100755 index 00000000..1147e20f --- /dev/null +++ b/apt-get-intall-primesense-nite-nonfree.sh @@ -0,0 +1,39 @@ +#!/bin/bash -e + +_THIS_DIR=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd) + +# run everythin within /tmp +cd /tmp +rm -fr primesense-nite-nonfree* # make sure we start from clean environment +if [ ! -e primesense-nite-nonfree-0.1 ]; then + apt-src install primesense-nite-nonfree +fi +NITE_LIB=NITE-Bin-Linux-x64-v1.5.2.23.tar.bz2 +if [ ! -e ${_THIS_DIR}/${NITE_LIB} ]; then + echo "Please put $NITE_LIB" + exit 1 +fi +if [ ! -e $NITE_LIB.zip ]; then + zip $NITE_LIB.zip ${_THIS_DIR}/$NITE_LIB +fi +set -x +# fix to use local .zip +sed -i "s@primesense-nite.tar.bz2.zip@$NITE_LIB.zip@" primesense-nite-nonfree-0.1/update-primesense-nite-nonfree +sed -i "s@^\s*wget@echo wget@" primesense-nite-nonfree-0.1/update-primesense-nite-nonfree +sed -i "s@\$checksum@$(sha256sum /tmp/$NITE_LIB.zip | cut -f1 -d\ )@" primesense-nite-nonfree-0.1/update-primesense-nite-nonfree +sed -i "s@/usr/lib/primesense-nite-nonfree/primesense-nite-nonfree-make-deb@/tmp/primesense-nite-nonfree-0.1/primesense-nite-nonfree-make-deb@" primesense-nite-nonfree-0.1/update-primesense-nite-nonfree + +sed -i "s@/usr/share/primesense-nite-nonfree/nite_debian_dir@/tmp/primesense-nite-nonfree-0.1/nite_debian_dir@" primesense-nite-nonfree-0.1/primesense-nite-nonfree-make-deb + +# create deb +apt-src build primesense-nite-nonfree + +# install +sudo dpkg -i primesense-nite-nonfree_0.1_amd64.deb +sudo dpkg -i /var/cache/primesense-nite-nonfree/openni-module-primesense-nite-nonfree_1.5.2.21-1_amd64.deb + +echo "OK" + + + + diff --git a/openni_pointer/CMakeLists.txt b/openni_pointer/CMakeLists.txt index 1aa08d48..02deac4d 100644 --- a/openni_pointer/CMakeLists.txt +++ b/openni_pointer/CMakeLists.txt @@ -1,23 +1,38 @@ -if(NOT ("$ENV{ROS_Distributions}" STREQUAL "electric" OR "$ENV{ROS_DISTRO}" STREQUAL "fuerte")) - include(catkin.cmake) - return() -endif() -cmake_minimum_required(VERSION 2.4.6) -include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake) -rosbuild_init() -set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin) +cmake_minimum_required(VERSION 2.8.3) +project(openni_pointer) +find_package(catkin REQUIRED COMPONENTS roscpp roslib geometry_msgs tf) -set(PC_NITE_DEV_INCLUDE_DIRS "/usr/include/nite") find_package(PkgConfig) pkg_check_modules(PC_LIBOPENNI REQUIRED libopenni) -include_directories( - ${PC_LIBOPENNI_INCLUDE_DIRS} - ${PC_NITE_DEV_INCLUDE_DIRS}) -if($ENV{ROS_DISTRO} STREQUAL "groovy") - add_definitions(-DUSE_PCL_AS_PCL_MSGS) +set(PC_NITE_DEV_INCLUDE_DIRS "/usr/include/nite") +set(PC_NITE_DEV_LIBRARIES XnVNite_1_3_1;OpenNI) + +catkin_package( + DEPENDS openni nite + CATKIN-DEPENDS roscpp roslib geometry_msgs tf + #INCLUDE_DIRS include + LIBRARIES ${PROJECT_NAME} +) + +if(NOT EXISTS ${PC_NITE_DEV_INCLUDE_DIRS}) + message(WARNING "-- Nite is not found, so could not compile ${PROJECT_NAME}") +else() + + include_directories( + ${PC_LIBOPENNI_INCLUDE_DIRS} + ${PC_NITE_DEV_INCLUDE_DIRS} + ${catkin_INCLUDE_DIRS}) + add_definitions(${PC_LIBOPENNI_CFLAGS_OTHER}) + add_executable(openni_pointer src/openni_pointer.cpp) + target_link_libraries(openni_pointer ${catkin_LIBRARIES} ${PC_NITE_DEV_LIBRARIES}) + + install(TARGETS ${PROJECT_NAME} openni_pointer + LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} + RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} + ) + endif() -rosbuild_add_executable(openni_pointer src/openni_pointer.cpp) -# https://code.ros.org/trac/ros-pkg/ticket/5287 -set(PC_NITE_DEV_LIBRARIES XnVNite_1_3_1;OpenNI) -target_link_libraries(openni_pointer ${PC_NITE_DEV_LIBRARIES}) +install(FILES openni_pointer.xml + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +) diff --git a/openni_pointer/Makefile b/openni_pointer/Makefile deleted file mode 100644 index b75b928f..00000000 --- a/openni_pointer/Makefile +++ /dev/null @@ -1 +0,0 @@ -include $(shell rospack find mk)/cmake.mk \ No newline at end of file diff --git a/openni_pointer/catkin.cmake b/openni_pointer/catkin.cmake deleted file mode 100644 index f60583b4..00000000 --- a/openni_pointer/catkin.cmake +++ /dev/null @@ -1,46 +0,0 @@ -# http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html -cmake_minimum_required(VERSION 2.8.3) -project(openni_pointer) -# Load catkin and all dependencies required for this package -# TODO: remove all from COMPONENTS that are not catkin packages. -#find_package(catkin REQUIRED COMPONENTS roscpp roslib geometry_msgs openni nite tf) -find_package(catkin REQUIRED COMPONENTS roscpp roslib geometry_msgs tf) - -find_package(PkgConfig) -pkg_check_modules(PC_LIBOPENNI REQUIRED libopenni) -#pkg_check_modules(PC_NITE_DEV REQUIRED nite-dev) -set(PC_NITE_DEV_INCLUDE_DIRS "/usr/include/nite") -set(PC_NITE_DEV_LIBRARIES XnVNite;OpenNI) - -if(NOT EXISTS PC_NITE_DEV_INCLUDE_DIRS) - message(WARNING "-- Nite is not found, so could not compile ${PROJECT_NAME}") - return() -endif() - -# TODO: fill in what other packages will need to use this package -## 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( - DEPENDS openni nite - CATKIN-DEPENDS roscpp roslib geometry_msgs tf - #INCLUDE_DIRS include - LIBRARIES ${PROJECT_NAME} -) - -include_directories( - ${PC_LIBOPENNI_INCLUDE_DIRS} - ${PC_NITE_DEV_INCLUDE_DIRS} - ${catkin_INCLUDE_DIRS}) -add_definitions(${PC_LIBOPENNI_CFLAGS_OTHER}) -add_executable(openni_pointer src/openni_pointer.cpp) -target_link_libraries(openni_pointer ${catkin_LIBRARIES} ${PC_NITE_DEV_LIBRARIES}) - -install(TARGETS ${PROJECT_NAME} openni_pointer - LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} - RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} -) -install(FILES openni_pointer.xml - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} -) diff --git a/openni_pointer/manifest.xml b/openni_pointer/manifest.xml deleted file mode 100644 index 2d500368..00000000 --- a/openni_pointer/manifest.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - -openni_pointer broadcasts the OpenNI hand position using tf. - - - - BSD - - http://ros.org/wiki/openni_pointer - - - - - - - - - - - - - - - diff --git a/openni_scene/CMakeLists.txt b/openni_scene/CMakeLists.txt index dc683b13..535872e4 100644 --- a/openni_scene/CMakeLists.txt +++ b/openni_scene/CMakeLists.txt @@ -1,23 +1,43 @@ -if(NOT USE_ROSBUILD) - include(catkin.cmake) - return() -endif() -cmake_minimum_required(VERSION 2.4.6) -include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake) -rosbuild_init() -set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin) +cmake_minimum_required(VERSION 2.8.3) +project(openni_scene) +find_package(catkin REQUIRED COMPONENTS roscpp roslib sensor_msgs pcl_ros pcl_msgs) -set(PC_NITE_DEV_INCLUDE_DIRS "/usr/include/nite") find_package(PkgConfig) pkg_check_modules(PC_LIBOPENNI REQUIRED libopenni) -include_directories( - ${PC_LIBOPENNI_INCLUDE_DIRS} - ${PC_NITE_DEV_INCLUDE_DIRS}) -if($ENV{ROS_DISTRO} STREQUAL "groovy") - add_definitions(-DUSE_PCL_AS_PCL_MSGS) +set(PC_NITE_DEV_INCLUDE_DIRS "/usr/include/nite") +set(PC_NITE_DEV_LIBRARIES XnVNite_1_3_1;OpenNI) + +catkin_package( + DEPENDS openni nite + CATKIN-DEPENDS roscpp roslib sensor_msgs pcl_ros pcl_msgs + #INCLUDE_DIRS include + LIBRARIES ${PROJECT_NAME} +) + +if(NOT EXISTS ${PC_NITE_DEV_INCLUDE_DIRS}) + message(WARNING "-- Nite is not found, so could not compile ${PROJECT_NAME}") +else() + + include_directories( + ${PC_LIBOPENNI_INCLUDE_DIRS} + ${PC_NITE_DEV_INCLUDE_DIRS} + ${catkin_INCLUDE_DIRS}) + add_definitions(${PC_LIBOPENNI_CFLAGS_OTHER}) + if($ENV{ROS_DISTRO} STREQUAL "groovy") + add_definitions(-DUSE_PCL_AS_PCL_MSGS) + endif() + add_executable(openni_scene src/openni_scene.cpp) + target_link_libraries(openni_scene ${catkin_LIBRARIES} ${PC_NITE_DEV_LIBRARIES}) + add_dependencies(openni_scene pcl_msgs_gencpp) + + + install(TARGETS ${PROJECT_NAME} openni_scene + LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} + RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} + ) + endif() -set(PC_NITE_DEV_LIBRARIES XnVNite_1_3_1;OpenNI) -rosbuild_find_ros_package(openni_camera) -rosbuild_add_executable(openni_scene src/openni_scene.cpp) -target_link_libraries(openni_scene ${PC_NITE_DEV_LIBRARIES}) +install(FILES openni_scene.xml + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +) diff --git a/openni_scene/Makefile b/openni_scene/Makefile deleted file mode 100644 index 73f3baa0..00000000 --- a/openni_scene/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -EXTRA_CMAKE_FLAGS = -DUSE_ROSBUILD:BOOL=1 -include $(shell rospack find mk)/cmake.mk \ No newline at end of file diff --git a/openni_scene/catkin.cmake b/openni_scene/catkin.cmake deleted file mode 100644 index 0d05da12..00000000 --- a/openni_scene/catkin.cmake +++ /dev/null @@ -1,51 +0,0 @@ -# http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html -cmake_minimum_required(VERSION 2.8.3) -project(openni_scene) -# Load catkin and all dependencies required for this package -# TODO: remove all from COMPONENTS that are not catkin packages. -#find_package(catkin REQUIRED COMPONENTS roscpp roslib geometry_msgs openni nite tf) -find_package(catkin REQUIRED COMPONENTS roscpp roslib sensor_msgs pcl_ros pcl_msgs) - -find_package(PkgConfig) -pkg_check_modules(PC_LIBOPENNI REQUIRED libopenni) -#pkg_check_modules(PC_NITE_DEV REQUIRED nite-dev) -set(PC_NITE_DEV_INCLUDE_DIRS "/usr/include/nite") -set(PC_NITE_DEV_LIBRARIES XnVNite;OpenNI) - -if(NOT EXISTS PC_NITE_DEV_INCLUDE_DIRS) - message(WARNING "-- Nite is not found, so could not compile ${PROJECT_NAME}") - return() -endif() - -# TODO: fill in what other packages will need to use this package -## 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( - DEPENDS openni nite - CATKIN-DEPENDS roscpp roslib sensor_msgs pcl_ros pcl_msgs - #INCLUDE_DIRS include - LIBRARIES ${PROJECT_NAME} -) - -include_directories( - ${PC_LIBOPENNI_INCLUDE_DIRS} - ${PC_NITE_DEV_INCLUDE_DIRS} - ${catkin_INCLUDE_DIRS}) -add_definitions(${PC_LIBOPENNI_CFLAGS_OTHER}) -if($ENV{ROS_DISTRO} STREQUAL "groovy") - add_definitions(-DUSE_PCL_AS_PCL_MSGS) -endif() -add_executable(openni_scene src/openni_scene.cpp) -target_link_libraries(openni_scene ${catkin_LIBRARIES} ${PC_NITE_DEV_LIBRARIES}) -add_dependencies(openni_scene pcl_msgs_gencpp) - - -install(TARGETS ${PROJECT_NAME} openni_scene - LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} - RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} -) -install(FILES openni_scene.xml - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} -) diff --git a/openni_scene/manifest.xml b/openni_scene/manifest.xml deleted file mode 100644 index da094e51..00000000 --- a/openni_scene/manifest.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - -openni_scene broadcasts the OpenNI scene segmented point clouds. - - - Kei Okada, Youhei Kakiuchi, Tim Field - BSD - - http://ros.org/wiki/openni_scene - - - - - - - - - - - - - - - diff --git a/openni_swipe/CMakeLists.txt b/openni_swipe/CMakeLists.txt index a5567d0c..3331cb91 100644 --- a/openni_swipe/CMakeLists.txt +++ b/openni_swipe/CMakeLists.txt @@ -1,23 +1,38 @@ -if(NOT ("$ENV{ROS_Distributions}" STREQUAL "electric" OR "$ENV{ROS_DISTRO}" STREQUAL "fuerte")) - include(catkin.cmake) - return() -endif() -cmake_minimum_required(VERSION 2.4.6) -include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake) -rosbuild_init() -set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin) -set(PC_NITE_DEV_INCLUDE_DIRS "/usr/include/nite") +cmake_minimum_required(VERSION 2.8.3) +project(openni_swipe) +find_package(catkin REQUIRED COMPONENTS roscpp roslib std_msgs) + find_package(PkgConfig) pkg_check_modules(PC_LIBOPENNI REQUIRED libopenni) -include_directories( - ${PC_LIBOPENNI_INCLUDE_DIRS} - ${PC_NITE_DEV_INCLUDE_DIRS}) -if($ENV{ROS_DISTRO} STREQUAL "groovy") - add_definitions(-DUSE_PCL_AS_PCL_MSGS) -endif() -rosbuild_add_executable(openni_swipe src/openni_swipe.cpp) - -# https://code.ros.org/trac/ros-pkg/ticket/5287 +set(PC_NITE_DEV_INCLUDE_DIRS "/usr/include/nite") set(PC_NITE_DEV_LIBRARIES XnVNite_1_3_1;OpenNI) -target_link_libraries(openni_swipe ${PC_NITE_DEV_LIBRARIES}) +catkin_package( + DEPENDS openni nite + CATKIN-DEPENDS roscpp roslib std_msgs + #INCLUDE_DIRS include + LIBRARIES ${PROJECT_NAME} +) + +if(NOT EXISTS ${PC_NITE_DEV_INCLUDE_DIRS}) + message(WARNING "-- Nite is not found, so could not compile ${PROJECT_NAME}") +else() + + include_directories( + ${PC_LIBOPENNI_INCLUDE_DIRS} + ${PC_NITE_DEV_INCLUDE_DIRS} + ${catkin_INCLUDE_DIRS}) + add_definitions(${PC_LIBOPENNI_CFLAGS_OTHER}) + add_executable(openni_swipe src/openni_swipe.cpp) + target_link_libraries(openni_swipe ${catkin_LIBRARIES} ${PC_NITE_DEV_LIBRARIES}) + + install(TARGETS ${PROJECT_NAME} openni_swipe + LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} + RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} + ) + +endif() + +install(FILES openni_swipe.xml + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +) diff --git a/openni_swipe/Makefile b/openni_swipe/Makefile deleted file mode 100644 index a40af840..00000000 --- a/openni_swipe/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -include $(shell rospack find mk)/cmake.mk - -# OSTYPE := $(shell uname -s) - -# SRC_FILES = main.cpp \ -# kbhit.cpp \ -# signal_catch.cpp - -# INC_DIRS += /home/tsuda/work/openni_unstable/Nite-Bin-Linux-x64-v1.5.0.2/Samples/Boxes -# INC_DIRS += /home/tsuda/work/openni_unstable/Nite-Bin-Linux-x64-v1.5.0.2/Include - -# ifeq ("$(OSTYPE)","Darwin") -# LDFLAGS += -framework OpenGL -framework GLUT -# else -# USED_LIBS += glut -# endif - -# DEFINES = USE_GLUT - -# EXE_NAME = Sample-Boxes -# include NiteSampleMakefile - diff --git a/openni_swipe/catkin.cmake b/openni_swipe/catkin.cmake deleted file mode 100644 index ff99e4d6..00000000 --- a/openni_swipe/catkin.cmake +++ /dev/null @@ -1,48 +0,0 @@ -# http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html -cmake_minimum_required(VERSION 2.8.3) -project(openni_swipe) -# Load catkin and all dependencies required for this package -# TODO: remove all from COMPONENTS that are not catkin packages. -#find_package(catkin REQUIRED COMPONENTS roscpp roslib geometry_msgs openni nite tf) -find_package(catkin REQUIRED COMPONENTS roscpp roslib std_msgs) - -find_package(PkgConfig) -pkg_check_modules(PC_LIBOPENNI REQUIRED libopenni) -#pkg_check_modules(PC_NITE_DEV REQUIRED nite-dev) -set(PC_NITE_DEV_INCLUDE_DIRS "/usr/include/nite") -set(PC_NITE_DEV_LIBRARIES XnVNite_1_3_1;OpenNI) - -if(NOT EXISTS PC_NITE_DEV_INCLUDE_DIRS) - message(WARNING "-- Nite is not found, so could not compile ${PROJECT_NAME}") - return() -endif() - - -# TODO: fill in what other packages will need to use this package -## 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( - DEPENDS openni nite - CATKIN-DEPENDS roscpp roslib std_msgs - #INCLUDE_DIRS include - LIBRARIES ${PROJECT_NAME} -) - -include_directories( - ${PC_LIBOPENNI_INCLUDE_DIRS} - ${PC_NITE_DEV_INCLUDE_DIRS} - ${catkin_INCLUDE_DIRS}) -add_definitions(${PC_LIBOPENNI_CFLAGS_OTHER}) -add_executable(openni_swipe src/openni_swipe.cpp) -target_link_libraries(openni_swipe ${catkin_LIBRARIES} ${PC_NITE_DEV_LIBRARIES}) - -install(TARGETS ${PROJECT_NAME} openni_swipe - LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} - RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} -) - -install(FILES openni_swipe.xml - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} -) diff --git a/openni_swipe/manifest.xml b/openni_swipe/manifest.xml deleted file mode 100644 index 7366396a..00000000 --- a/openni_swipe/manifest.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - openni_swipe - - - tsuda - BSD - - http://ros.org/wiki/openni_swipe - - - - - - - - - - - - - - - - - diff --git a/stack.xml b/stack.xml deleted file mode 100644 index 7c7b5668..00000000 --- a/stack.xml +++ /dev/null @@ -1,10 +0,0 @@ - - jsk_openni_kinect - Maintained by tsuda - BSD - - http://ros.org/wiki/jsk_openni_kinect - - - -