Need help converting a package to catkin
I'm hoping some kind hearted catkin expert can help me convert my rosbuild package to catkin. The package is skeleton_markers and unfortunately the catkinize script seems to be currently broken for simple packages (though it works OK for stacks).
While I can piece together some of the parts, I can't get the whole thing to work, especially the dependencies on NITE and OpenNI for my cpp executable. Here are the current manifest.xml and CMakeLists.txt files:
manifest.xml:
<package>
<description brief="skeleton_markers">
Skeleton Markers: Publish a list of joint markers for viewing in RViz
</description>
<author>Patrick Goebel</author>
<license>BSD</license>
<review status="unreviewed" notes=""/>
<url>http://ros.org/wiki/skeleton_markers</url>
<depend package="rospy"/>
<depend package="roscpp"/>
<depend package="visualization_msgs"/>
<depend package="std_msgs"/>
<depend package="geometry_msgs"/>
<depend package="openni_camera"/>
<depend package="openni_tracker"/>
<export>
<cpp cflags="-I/usr/include/openni -I/usr/include/nite -I/usr/include/ni"/>
</export>
</package>
CMakeLists.txt:
cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
# 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()
#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)
#uncomment if you have defined messages
rosbuild_genmsg()
#uncomment if you have defined services
#rosbuild_gensrv()
#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(${PROJECT_NAME} thread)
#rosbuild_add_executable(example examples/example.cpp)
#target_link_libraries(example ${PROJECT_NAME})
include_directories(/usr/include/openni /usr/include/nite /usr/include/ni)
rosbuild_add_executable(skeleton_tracker src/skeleton_tracker.cpp src/KinectController.cpp src/KinectDisplay.cpp)
target_link_libraries(skeleton_tracker glut OpenNI orocos-kdl tf)
Can anyone convert these to the corresponding package.xml and CMakeLists.txt files for catkin?
UPDATE: Here are the package.xml and CMakeLists.txt files I came up with after looking at these files for the openni_tracker package. Below the two files I list the error messages I get when compiling.
package.xml
<package>
<name>skeleton_markers</name>
<version>0.4.0</version>
<description>
Skeleton Markers: Publish a list of joint markers
for viewing in RViz.
</description>
<maintainer <a href="mailto:email="patrick@pirobot.org">Patrick">email="patrick@pirobot.org">Patrick</a> Goebel</maintainer>
<license>BSD</license>
<url type="website">http://ros.org/wiki/skeleton_markers</url>
<url type="https://github.com/pirobot/skeleton_markers/issues"></url>
<author <a href="mailto:email="patrick@pirobot.org">Patrick">email="patrick@pirobot.org">Patrick</a> Goebel</author>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>libopenni-dev</build_depend>
<build_depend>libopenni-nite-dev</build_depend>
<build_depend>libopenni-sensor-primesense-dev</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>orocos_kdl</build_depend>
<build_depend>message_generation</build_depend>
<build_depend>visualization_msgs</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>openni_camera</build_depend>
<build_depend>openni_tracker</build_depend>
<build_depend>rospy</build_depend>
<build_depend>roscpp</build_depend>
<run_depend>libopenni-dev</run_depend>
<run_depend>libopenni-nite-dev</run_depend>
<run_depend>libopenni-sensor-primesense-dev</run_depend>
<run_depend>geometry_msgs</run_depend ...
Patrick: it would help for you to update your question, adding your package.xml and updated CMakelists.txt, with the error messages you get from CMake.
@joq - As requested, I have updated my question with my catkin package.xml and CMakeLists.txt files as well as the errors I get when I run catkin_make.
Hv u solved your problem? I hv kind of same problem but i changed openni_tracker or openni_camera to libfreenect. I dunno is it a real different or not.. yet, i hv problem with their library to my code.cpp/.h
The answer from @mardo is marked "accepted". If you have a different issue, please open a new question, which can link to this one, if appropriate.