Skip to content

Commit

Permalink
Merge pull request #7 from bmagyar/hydro-devel
Browse files Browse the repository at this point in the history
Migrated to hydro and catkinized
  • Loading branch information
bmagyar committed Apr 22, 2014
2 parents 26ccbb5 + b556230 commit 3e25200
Show file tree
Hide file tree
Showing 24 changed files with 252 additions and 242 deletions.
17 changes: 0 additions & 17 deletions CMakeLists.txt

This file was deleted.

1 change: 0 additions & 1 deletion Makefile

This file was deleted.

62 changes: 29 additions & 33 deletions blort/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -125,4 +120,5 @@ rosbuild_add_library(module_recognizer3d
src/Recognizer3D/Config.cc
src/Recognizer3D/CodebookEntry.cc
)
target_link_libraries(module_recognizer3d ${catkin_LIBRARIES})

21 changes: 0 additions & 21 deletions blort/manifest.xml

This file was deleted.

39 changes: 39 additions & 0 deletions blort/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<package>
<name>blort</name>
<version>0.0.1</version>
<description>
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.
</description>
<maintainer email="bencemagyar@pal-robotics.com">Bence Magyar</maintainer>
<license>BSD</license>
<url type="website">http://ros.org/wiki/perception_blort</url>
<url type="website">http://www.acin.tuwien.ac.at/?id=290</url>
<author email="moerwald@acin.tuwien.ac.at">Thomas Mörwald</author>
<author email="zillich@acin.tuwien.ac.at">Michael Zillich</author>
<author email="arichtsfeld@acin.tuwien.ac.at">Andreas Richtsfeld</author>
<author email="prankl@acin.tuwien.ac.at">Johann Prankl</author>
<author email="vincze@acin.tuwien.ac.at"> Markus Vincze</author>
<author email="bencemagyar@pal-robotics.com">Bence Magyar</author>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>opencv2</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>tf</build_depend>
<build_depend>siftgpu</build_depend>
<build_depend>libglew</build_depend>
<build_depend>libglew-dev</build_depend>
<run_depend>roscpp</run_depend>
<run_depend>opencv2</run_depend>
<run_depend>geometry_msgs</run_depend>
<run_depend>sensor_msgs</run_depend>
<run_depend>tf</run_depend>
<run_depend>siftgpu</run_depend>
<run_depend>libglew</run_depend>
<run_depend>libglew-dev</run_depend>
<!--
opengl
libglu1
-->
</package>
102 changes: 58 additions & 44 deletions blort_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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})
Binary file added blort_ros/Resources/img/pringles_template.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions blort_ros/cfg/Detector.cfg
Original file line number Diff line number Diff line change
@@ -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()

Expand Down
3 changes: 1 addition & 2 deletions blort_ros/cfg/Tracker.cfg
Original file line number Diff line number Diff line change
@@ -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()

Expand Down
11 changes: 0 additions & 11 deletions blort_ros/cfg/detector.cfg

This file was deleted.

26 changes: 0 additions & 26 deletions blort_ros/cfg/tracker.cfg

This file was deleted.

9 changes: 9 additions & 0 deletions blort_ros/launch/histogram_segment.launch
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<launch>
<group ns="/histogram_segmentation">
<rosparam command="load" file="$(find pal_vision_segmentation)/config/default_tabletop_histogram.yaml" />
</group>

<node pkg="pal_vision_segmentation" type="histogram_segmentation" name="histogram_segmentation" args="$(find blort_ros)/Resources/img/pringles_template.png">
<remap from="image" to="/stereo/left/image" />
</node>
</launch>
Loading

0 comments on commit 3e25200

Please sign in to comment.