diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 28105dd..0000000 --- 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 a818cca..0000000 --- a/Makefile +++ /dev/null @@ -1 +0,0 @@ -include $(shell rospack find mk)/cmake_stack.mk \ No newline at end of file diff --git a/blort/CMakeLists.txt b/blort/CMakeLists.txt index c2b7d5e..aab089b 100644 --- a/blort/CMakeLists.txt +++ b/blort/CMakeLists.txt @@ -1,42 +1,37 @@ -cmake_minimum_required(VERSION 2.4.6) -include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake) +cmake_minimum_required(VERSION 2.8.3) +project(blort) -# 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 Release) - -rosbuild_init() - -#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) +find_package(catkin REQUIRED COMPONENTS + roscpp + geometry_msgs + tf + sensor_msgs + siftgpu +) -#uncomment if you have defined messages -#rosbuild_genmsg() -#uncomment if you have defined services -#rosbuild_gensrv() +find_package(OpenCV REQUIRED) set(SIFTGPU_INC /usr/local/include/SiftGPU CACHE PATH "Path to SiftGPU header files") set(SIFTGPU_LIB /usr/local/lib CACHE PATH "Path to SiftGPU library") -include_directories(${SIFTGPU_INC}) -include_directories("${PROJECT_SOURCE_DIR}/src") + +include_directories(${catkin_INCLUDE_DIRS} ${SIFTGPU_INC} + "${PROJECT_SOURCE_DIR}/src" "include/blort" include) + +catkin_package( + INCLUDE_DIRS include "${PROJECT_SOURCE_DIR}/src" "include/blort" ${catkin_INCLUDE_DIRS} +) -rosbuild_add_library(module_glwindow +add_definitions(-DLINUX) + +add_library(module_glwindow src/GLWindow/GLXWindowGetEvent.cpp src/GLWindow/GLXWindow.cpp src/GLWindow/glxhidingwindow.cpp ) -rosbuild_add_compile_flags(module_glwindow -DLINUX) - target_link_libraries(module_glwindow GLU GL glut X11 rt) -rosbuild_add_library(module_tomgine +add_library(module_tomgine src/TomGine/tgVector3.cpp src/TomGine/tgTimer.cpp src/TomGine/tgTexture.cpp @@ -63,11 +58,11 @@ rosbuild_add_library(module_tomgine src/TomGine/tgCamera.cpp src/TomGine/ply.c ) -rosbuild_add_compile_flags(module_tomgine -DLINUX) -rosbuild_add_compile_flags(module_tomgine -DGL_GLEXT_PROTOTYPES) -target_link_libraries(module_tomgine GLU GL) +set_target_properties(module_tomgine PROPERTIES COMPILE_FLAGS -DLINUX) +set_target_properties(module_tomgine PROPERTIES COMPILE_FLAGS -DGL_GLEXT_PROTOTYPES) +target_link_libraries(module_tomgine GLU GL ${OpenCV_LIBS}) -rosbuild_add_library(module_threadobject +add_library(module_threadobject src/ThreadObject/TomGineThread.cpp src/ThreadObject/Thread.cpp src/ThreadObject/RecognizerThread.cpp @@ -77,7 +72,7 @@ rosbuild_add_library(module_threadobject ) target_link_libraries(module_threadobject module_tomgine module_recognizer3d) -rosbuild_add_library(module_tracker +add_library(module_tracker src/Tracker/TrackerThread.cpp src/Tracker/TrackerModel.cpp src/Tracker/Tracker.cpp @@ -101,10 +96,10 @@ rosbuild_add_library(module_tracker src/Tracker/CameraThread.cpp src/blort/pal_util.cpp ) -rosbuild_add_compile_flags(module_tracker -DGL_GLEXT_PROTOTYPES) +set_target_properties(module_tracker PROPERTIES COMPILE_FLAGS -DGL_GLEXT_PROTOTYPES) target_link_libraries(module_tracker module_tomgine module_threadobject module_glwindow) -rosbuild_add_library(module_recognizer3d +add_library(module_recognizer3d src/Recognizer3D/Vector2.cc src/Recognizer3D/SPolygon.cc src/Recognizer3D/SDraw.cc @@ -125,4 +120,5 @@ rosbuild_add_library(module_recognizer3d src/Recognizer3D/Config.cc src/Recognizer3D/CodebookEntry.cc ) +target_link_libraries(module_recognizer3d ${catkin_LIBRARIES}) diff --git a/blort/manifest.xml b/blort/manifest.xml deleted file mode 100644 index 72e34b5..0000000 --- a/blort/manifest.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - BLORT - The Blocks World Robotic Vision Toolbox
- Ported and refactored version of the library. -
- Michael Zillich et al., maintained by Bence Magyar - BSD - - http://ros.org/wiki/pal_blort - - - - - - - - - - - -
diff --git a/blort/package.xml b/blort/package.xml new file mode 100644 index 0000000..38171ea --- /dev/null +++ b/blort/package.xml @@ -0,0 +1,39 @@ + + blort + 0.0.1 + + BLORT - The Blocks World Robotic Vision Toolbox. Ported and refactored version of the library. + Mörwald, T.; Prankl, J.; Richtsfeld, A.; Zillich, M.; Vincze, M. BLORT - The Blocks World Robotic Vision Toolbox Best Practice in 3D Perception and Modeling for Mobile Manipulation (in conjunction with ICRA 2010), 2010. + + Bence Magyar + BSD + http://ros.org/wiki/perception_blort + http://www.acin.tuwien.ac.at/?id=290 + Thomas Mörwald + Michael Zillich + Andreas Richtsfeld + Johann Prankl + Markus Vincze + Bence Magyar + catkin + roscpp + opencv2 + geometry_msgs + sensor_msgs + tf + siftgpu + libglew + libglew-dev + roscpp + opencv2 + geometry_msgs + sensor_msgs + tf + siftgpu + libglew + libglew-dev + + diff --git a/blort_ros/CMakeLists.txt b/blort_ros/CMakeLists.txt index 52d4ce4..68c6278 100644 --- a/blort_ros/CMakeLists.txt +++ b/blort_ros/CMakeLists.txt @@ -1,66 +1,80 @@ -cmake_minimum_required(VERSION 2.4.6) -include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake) +cmake_minimum_required(VERSION 2.8.3) +project(blort_ros) -# 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) +find_package(catkin REQUIRED COMPONENTS + blort + roscpp + geometry_msgs + tf + sensor_msgs + dynamic_reconfigure + image_transport + cv_bridge + message_generation +) -rosbuild_init() +find_package(OpenCV REQUIRED) -#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) +add_message_files( + FILES + NameTypeValue.msg + ObjectPoseList.msg + ObjectPose.msg + TrackerConfidences.msg + TrackerResults.msg +) -#uncomment if you have defined messages -rosbuild_genmsg() -#uncomment if you have defined services -rosbuild_gensrv() -#add dynamic reconfigure api +add_service_files( + FILES + EstimatePose.srv + RecoveryCall.srv + SetCameraInfo.srv + TrackerCommand.srv +) -rosbuild_find_ros_package(dynamic_reconfigure) -include(${dynamic_reconfigure_PACKAGE_PATH}/cmake/cfgbuild.cmake) -gencfg() +generate_messages( + DEPENDENCIES geometry_msgs sensor_msgs +) -rosbuild_add_executable(learnsifts src/nodes/learnsifts.cpp) -target_link_libraries(learnsifts siftgpu ${OpenCV_INCLUDE_DIRS}) +generate_dynamic_reconfigure_options( + cfg/Tracker.cfg + cfg/Detector.cfg +) + +include_directories(include ${catkin_INCLUDE_DIRS}) + +catkin_package( +) + +add_executable(learnsifts src/nodes/learnsifts.cpp) +target_link_libraries(learnsifts siftgpu ${OpenCV_INCLUDE_DIRS} ${catkin_LIBRARIES}) target_link_libraries(learnsifts module_tomgine module_glwindow module_tracker module_threadobject module_recognizer3d) -rosbuild_add_executable(gltracker_node src/nodes/tracker_node.cpp - src/trackerinterface.hpp - src/gltracker.cpp) +add_executable(gltracker_node src/nodes/tracker_node.cpp + src/trackerinterface.hpp + src/gltracker.cpp) target_link_libraries(gltracker_node ${OpenCV_INCLUDE_DIRS} module_tomgine module_tracker module_glwindow + ${catkin_LIBRARIES} GLU GL glut X11 rt) -rosbuild_add_executable(gldetector_node src/nodes/detector_node.cpp - src/gldetector.cpp) +add_executable(gldetector_node src/nodes/detector_node.cpp + src/gldetector.cpp) target_link_libraries(gldetector_node ${OpenCV_INCLUDE_DIRS} + ${catkin_LIBRARIES} module_tracker module_tomgine siftgpu module_recognizer3d) +add_library(${PROJECT_NAME} src/pose_util.cpp) -rosbuild_add_library(${PROJECT_NAME} src/pose_util.cpp) - -rosbuild_add_executable(pose2Tf src/nodes/pose2Tf.cpp) -target_link_libraries(pose2Tf ${PROJECT_NAME}) - -rosbuild_add_executable(pose2Tf_repeat src/nodes/pose2Tf_repeat.cpp) -target_link_libraries(pose2Tf_repeat ${PROJECT_NAME}) - +add_executable(pose2Tf src/nodes/pose2Tf.cpp) +target_link_libraries(pose2Tf ${PROJECT_NAME} + ${catkin_LIBRARIES}) -#common commands for building c++ executables and libraries -#rosbuild_add_library(${PROJECT_NAME} src/example.cpp) -#target_link_libraries(${PROJECT_NAME} another_library) -rosbuild_add_boost_directories() -rosbuild_link_boost(gltracker_node signals) -#rosbuild_add_executable(example examples/example.cpp) -#target_link_libraries(example ${PROJECT_NAME}) +add_executable(pose2Tf_repeat src/nodes/pose2Tf_repeat.cpp) +target_link_libraries(pose2Tf_repeat ${PROJECT_NAME} + ${catkin_LIBRARIES}) diff --git a/blort_ros/Resources/img/pringles_template.png b/blort_ros/Resources/img/pringles_template.png new file mode 100644 index 0000000..dbb8180 Binary files /dev/null and b/blort_ros/Resources/img/pringles_template.png differ diff --git a/blort_ros/cfg/Detector.cfg b/blort_ros/cfg/Detector.cfg index d36fe0d..f1f54ea 100755 --- a/blort_ros/cfg/Detector.cfg +++ b/blort_ros/cfg/Detector.cfg @@ -1,8 +1,7 @@ #!/usr/bin/env python PACKAGE = "blort_ros" -import roslib;roslib.load_manifest(PACKAGE) -from dynamic_reconfigure.parameter_generator import * +from dynamic_reconfigure.parameter_generator_catkin import * gen = ParameterGenerator() diff --git a/blort_ros/cfg/Tracker.cfg b/blort_ros/cfg/Tracker.cfg index 58533e1..adb5cba 100755 --- a/blort_ros/cfg/Tracker.cfg +++ b/blort_ros/cfg/Tracker.cfg @@ -1,8 +1,7 @@ #!/usr/bin/env python PACKAGE = "blort_ros" -import roslib;roslib.load_manifest(PACKAGE) -from dynamic_reconfigure.parameter_generator import * +from dynamic_reconfigure.parameter_generator_catkin import * gen = ParameterGenerator() diff --git a/blort_ros/cfg/detector.cfg b/blort_ros/cfg/detector.cfg deleted file mode 100755 index 5b4ad0a..0000000 --- a/blort_ros/cfg/detector.cfg +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python -PACKAGE = "blort_ros" -import roslib;roslib.load_manifest(PACKAGE) - -from dynamic_reconfigure.parameter_generator import * - -gen = ParameterGenerator() - -gen.add("recovery_conf_threshold", double_t, 0, "Threshold for recovery confidence", 0.05, 0, 0.5) -gen.add("visualize", bool_t, 0, "Visualize object pose", False) -exit(gen.generate(PACKAGE, "gldetector_node", "detector")) diff --git a/blort_ros/cfg/tracker.cfg b/blort_ros/cfg/tracker.cfg deleted file mode 100755 index 6edc52a..0000000 --- a/blort_ros/cfg/tracker.cfg +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python -PACKAGE = "blort_ros" -import roslib;roslib.load_manifest(PACKAGE) - -from dynamic_reconfigure.parameter_generator import * - -gen = ParameterGenerator() - -gen.add("lock", bool_t, 0, "Lock", False) -gen.add("edge", bool_t, 0, "Visualize edges", False) -gen.add("reset", bool_t, 0, "Reset tracker", False) -publish_mode_enum = gen.enum([ gen.const("Good", int_t, 0,""), - gen.const("Good_and_fair", int_t, 1,""), - gen.const("All", int_t, 2,"") - ], "Publish modes") -gen.add("publish_mode", int_t, 1, "Publish mode", 1, 0, 2, edit_method=publish_mode_enum) - -vis_mode_enum = gen.enum([ gen.const("Textured", int_t, 0,""), - gen.const("Frame", int_t, 1,""), - gen.const("Particles", int_t, 2,""), - gen.const("Nothing",int_t, 3,"") - ], "Render modes") -gen.add("render_mode", int_t, 1, "Render mode", 0, 0, 3, edit_method=vis_mode_enum) -gen.add("visualize_obj_pose", bool_t, 0, "Visualize object pose", False) -gen.add("time_to_run_singleshot", double_t, 0, "Time to run singleshot mode", 10.0, 1.0, 100.0) -exit(gen.generate(PACKAGE, "gltracker_node", "tracker")) diff --git a/blort_ros/launch/histogram_segment.launch b/blort_ros/launch/histogram_segment.launch new file mode 100644 index 0000000..3ab05c3 --- /dev/null +++ b/blort_ros/launch/histogram_segment.launch @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/blort_ros/manifest.xml b/blort_ros/manifest.xml deleted file mode 100644 index 14b12bc..0000000 --- a/blort_ros/manifest.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - BLORT - The Blocks World Robotic Vision Toolbox
- ROS interface classes and nodes for the BLORT library. - -
- Bence Magyar - BSD - - http://ros.org/wiki/blort_ros - - - - - - - - - - -
diff --git a/blort_ros/package.xml b/blort_ros/package.xml new file mode 100644 index 0000000..2f9e8e6 --- /dev/null +++ b/blort_ros/package.xml @@ -0,0 +1,38 @@ + + blort_ros + 0.0.1 + + BLORT - The Blocks World Robotic Vision Toolbox
+ ROS interface classes and nodes for the BLORT library. +
+ Bence Magyar + BSD + Bence Magyar0 + http://ros.org/wiki/blort_ros + + catkin + + roscpp + opencv2 + geometry_msgs + sensor_msgs + tf + dynamic_reconfigure + blort + cv_bridge + image_transport + std_msgs + + roscpp + rospy + opencv2 + geometry_msgs + sensor_msgs + tf + dynamic_reconfigure + blort + cv_bridge + image_transport + std_msgs + +
diff --git a/blort_ros/src/nodes/call_SingleShot.py b/blort_ros/src/nodes/call_SingleShot.py index a9eb79d..878b267 100644 --- a/blort_ros/src/nodes/call_SingleShot.py +++ b/blort_ros/src/nodes/call_SingleShot.py @@ -33,12 +33,11 @@ # ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # -import roslib; roslib.load_manifest('pal_blort') import sys import rospy -from pal_blort.srv import * +from blort_ros.srv import * from geometry_msgs.msg import Pose service='blort_tracker/singleshot_service' diff --git a/blort_ros/src/nodes/pose_utils.py b/blort_ros/src/nodes/pose_utils.py index 9ce2350..59fed51 100755 --- a/blort_ros/src/nodes/pose_utils.py +++ b/blort_ros/src/nodes/pose_utils.py @@ -34,7 +34,7 @@ # POSSIBILITY OF SUCH DAMAGE. # -import roslib; roslib.load_manifest('pal_blort') +import rospy import re import subprocess from multiprocessing import Process diff --git a/blort_ros/src/nodes/testSingleShot.py b/blort_ros/src/nodes/testSingleShot.py index a91a01f..6148664 100755 --- a/blort_ros/src/nodes/testSingleShot.py +++ b/blort_ros/src/nodes/testSingleShot.py @@ -34,7 +34,7 @@ # POSSIBILITY OF SUCH DAMAGE. # -import roslib; roslib.load_manifest('pal_blort') +import rospy import re import subprocess from multiprocessing import Process diff --git a/blort_ros/src/nodes/testSingleShot2.py b/blort_ros/src/nodes/testSingleShot2.py index 0c89c86..ebf6305 100755 --- a/blort_ros/src/nodes/testSingleShot2.py +++ b/blort_ros/src/nodes/testSingleShot2.py @@ -34,7 +34,7 @@ # POSSIBILITY OF SUCH DAMAGE. # -import roslib; roslib.load_manifest('pal_blort') +import rospy import re import subprocess from multiprocessing import Process diff --git a/perception_blort/CMakeLists.txt b/perception_blort/CMakeLists.txt new file mode 100644 index 0000000..9084993 --- /dev/null +++ b/perception_blort/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required(VERSION 2.8.3) +project(perception_blort) +find_package(catkin REQUIRED) +catkin_metapackage() diff --git a/perception_blort/package.xml b/perception_blort/package.xml new file mode 100644 index 0000000..1d13ba2 --- /dev/null +++ b/perception_blort/package.xml @@ -0,0 +1,15 @@ + + + perception_blort + 0.0.1 + The perception_blort package + Bence Magyar + BSD + catkin + blort + blort_ros + siftgpu + + + + diff --git a/siftgpu/CMakeLists.txt b/siftgpu/CMakeLists.txt index 7a1d4a9..7594374 100644 --- a/siftgpu/CMakeLists.txt +++ b/siftgpu/CMakeLists.txt @@ -1,41 +1,41 @@ -cmake_minimum_required(VERSION 2.4.6) -include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake) +cmake_minimum_required(VERSION 2.8.3) +project(siftgpu) -# 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) - -rosbuild_init() - -INCLUDE(FindPkgConfig) +find_package(catkin REQUIRED COMPONENTS +# libglew +# libglew-dev +# libdevil-dev +) +find_package(PkgConfig) pkg_check_modules(GLEW REQUIRED glew) -#set the default path for built libraries to the "lib" directory -set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib) - -rosbuild_add_library(${PROJECT_NAME} src/CLTexImage.cpp - src/CuTexImage.cpp - src/FrameBufferObject.cpp - src/GlobalUtil.cpp - src/GLTexImage.cpp - src/ProgramCG.cpp - src/ProgramCL.cpp - src/ProgramGLSL.cpp - src/ProgramGPU.cpp - src/PyramidCL.cpp - src/PyramidCU.cpp - src/PyramidGL.cpp - src/ShaderMan.cpp - src/SiftGPU.cpp - src/SiftMatch.cpp - src/SiftMatchCU.cpp - src/SiftPyramid.cpp) - +include_directories(include) + +catkin_package( + INCLUDE_DIRS include + LIBRARIES ${PROJECT_NAME} + DEPENDS libglew +) + + +add_library(${PROJECT_NAME} src/CLTexImage.cpp + src/CuTexImage.cpp + src/FrameBufferObject.cpp + src/GlobalUtil.cpp + src/GLTexImage.cpp + src/ProgramCG.cpp + src/ProgramCL.cpp + src/ProgramGLSL.cpp + src/ProgramGPU.cpp + src/PyramidCL.cpp + src/PyramidCU.cpp + src/PyramidGL.cpp + src/ShaderMan.cpp + src/SiftGPU.cpp + src/SiftMatch.cpp + src/SiftMatchCU.cpp + src/SiftPyramid.cpp) target_link_libraries(${PROJECT_NAME} ${GLEW_LIBRARIES} IL) diff --git a/siftgpu/manifest.xml b/siftgpu/manifest.xml deleted file mode 100644 index 51ed8c9..0000000 --- a/siftgpu/manifest.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - The SiftGPU library is an implementation of SIFT for GPU. - - - Changchang Wu, maintained by Bence Magyar - non-profit license from University of North Carolina - - http://ros.org/wiki/siftgpu - - - - - - - diff --git a/siftgpu/package.xml b/siftgpu/package.xml new file mode 100644 index 0000000..85bac33 --- /dev/null +++ b/siftgpu/package.xml @@ -0,0 +1,20 @@ + + siftgpu + 0.0.1 + + The SiftGPU library is an implementation of SIFT for GPU. + + Bence Magyar + non-profit license from University of North Carolina + Changchang Wu + http://cs.unc.edu/~ccwu/siftgpu/ + http://ros.org/wiki/siftgpu + + catkin + libglew + libglew-dev + libdevil-dev + libglew + libglew-dev + libdevil-dev + diff --git a/stack.xml b/stack.xml deleted file mode 100644 index f13c978..0000000 --- a/stack.xml +++ /dev/null @@ -1,7 +0,0 @@ - - perception_blort - Created by Bence Magyar, Maintained by Jordi Pages - BSD, Modified BSD, non-profit license from University of North Carolina - - http://ros.org/wiki/perception_blort -