Converting the remaining part of a catkin cmakelist to rosbuild
Hi have tried to convert this catkinized cmakelist to rosbuild but without success. I'm running ROS Fuerte. Here is the original:
cmake_minimum_required(VERSION 2.8.3)
project(leg_tracker)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
tf
interactive_markers
rosbag
image_geometry
message_generation
)
add_message_files(
FILES
Person.msg
PersonArray.msg
Leg.msg
LegArray.msg
)
generate_messages(
DEPENDENCIES
std_msgs
geometry_msgs
)
catkin_package(
CATKIN_DEPENDS message_runtime
)
include_directories(
INCLUDE include
${catkin_INCLUDE_DIRS}
)
add_executable(
detect_leg_clusters
src/detect_leg_clusters.cpp
src/laser_processor.cpp
src/cluster_features.cpp
)
target_link_libraries(
detect_leg_clusters
${catkin_LIBRARIES}
)
add_executable(
local_occupancy_grid_mapping
src/local_occupancy_grid_mapping.cpp
src/laser_processor.cpp
)
target_link_libraries(
local_occupancy_grid_mapping
${catkin_LIBRARIES}
)
add_executable(
extract_positive_training_clusters
src/extract_positive_training_clusters.cpp
src/laser_processor.cpp
)
target_link_libraries(
extract_positive_training_clusters
${catkin_LIBRARIES}
)
add_executable(
train_leg_detector
src/train_leg_detector.cpp
src/laser_processor.cpp
src/cluster_features.cpp
)
target_link_libraries(
train_leg_detector
${catkin_LIBRARIES}
)
add_dependencies(local_occupancy_grid_mapping ${PROJECT_NAME}_generate_messages_cpp)
add_dependencies(local_occupancy_grid_mapping ${PROJECT_NAME}_gencpp)
add_dependencies(local_occupancy_grid_mapping ${PROJECT_NAME}_gencfg)
add_dependencies(detect_leg_clusters ${PROJECT_NAME}_generate_messages_cpp)
add_dependencies(detect_leg_clusters ${PROJECT_NAME}_gencpp)
add_dependencies(detect_leg_clusters ${PROJECT_NAME}_gencfg)
add_dependencies(extract_positive_training_clusters ${PROJECT_NAME}_generate_messages_cpp)
add_dependencies(extract_positive_training_clusters ${PROJECT_NAME}_gencpp)
add_dependencies(extract_positive_training_clusters ${PROJECT_NAME}_gencfg)
add_dependencies(train_leg_detector ${PROJECT_NAME}_generate_messages_cpp)
add_dependencies(train_leg_detector ${PROJECT_NAME}_gencpp)
add_dependencies(train_leg_detector ${PROJECT_NAME}_gencfg)
install(
PROGRAMS scripts/joint_leg_tracker.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(
PROGRAMS scripts/individual_leg_tracker.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
I've reduced the file down to this
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()
include($ENV{ROS_WORKSPACE}/rosbuild.cmake)
#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()
rosbuild_add_executable(
detect_leg_clusters
src/detect_leg_clusters.cpp
src/laser_processor.cpp
src/cluster_features.cpp
)
rosbuild_add_executable(
local_occupancy_grid_mapping
src/local_occupancy_grid_mapping.cpp
src/laser_processor.cpp
)
rosbuild_add_executable(
extract_positive_training_clusters
src/extract_positive_training_clusters.cpp
src/laser_processor.cpp
)
rosbuild_add_executable(
train_leg_detector
src/train_leg_detector.cpp
src/laser_processor.cpp
src/cluster_features.cpp
)
And the package.xml has been renamed to manifest.xml and changed accordingly. Here is the original package.xml:
<?xml version="1.0"?>
<package>
<name>leg_tracker</name>
<version>0.0.0</version>
<description>The leg_detector package</description>
<maintainer email="angus@todo.todo">angus</maintainer>
<license>TODO</license>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>tf</build_depend>
<build_depend>rosbag</build_depend>
<build_depend>image_geometry</build_depend>
<build_depend>message_generation</build_depend>
<build_depend>libfftw3</build_depend>
<run_depend>roscpp</run_depend>
<run_depend>rospy</run_depend>
<run_depend>std_msgs</run_depend>
<run_depend>tf</run_depend>
<run_depend>rosbag</run_depend>
<run_depend>image_geometry</run_depend>
<run_depend>message_runtime</run_depend>
<run_depend>libfftw3</run_depend>
</package>
Which I've reduced and commented out the message_generation and libfftw3 since running a rosmake couldn't find these packages:
<package>
<name>leg_tracker</name>
<version>0.0.0</version>
<description brief="The leg_detector package">The leg_detector package</description>
<maintainer email="angus@todo.todo">angus</maintainer>
<license>TODO</license>
<depend package="roscpp"/>
<depend package="rospy"/>
<depend package="tf"/>
<depend package="rosbag"/>
<depend package="image_geometry"/>
<!--<depend pacakge="message_generation"/> missing dependency fuerte-->
<!--<depend package="libfftw3"/-->
</package>
Right now I'm getting an error that says
[ 4%] Generating ../msg_gen/lisp/Leg.lisp, ../msg_gen/lisp/_package.lisp, ../msg_gen/lisp/_package_Leg.lisp
Traceback (most recent call last):
File "/opt/ros/fuerte/share/roslisp/rosbuild/scripts/genmsg_lisp.py", line 871, in <module>
generate_msg(sys.argv[1])
File "/opt/ros/fuerte/share/roslisp/rosbuild/scripts/genmsg_lisp.py", line 725, in generate_msg
(_, spec) = roslib.msgs.load_from_file(msg_path, package)
File "/opt/ros/fuerte/lib/python2.7/dist-packages/roslib/msgs.py", line 661, in load_from_file
raise MsgSpecException("%s: [%s] is not a legal type name"%(file_path, type_))
roslib.msgs.MsgSpecException: /home/servetcoskun/robot/mir_fuerte/leg_tracker-indigo/msg/Leg.msg: [leg_tracker-indigo/Leg] is not a legal type name
It would be awesome if someone could help me convert this catking package.xml and cmakelist to a rosbuild version, or atleast guide me in the right direction.
Thank you :)
Asked by JamesWell on 2016-07-07 08:16:41 UTC
Comments
What is the purpose of doing this?
Asked by joq on 2016-07-07 09:17:56 UTC
Using the work from an article presented at ICRA2015 - github repo here https://github.com/angusleigh/leg_tracker
Asked by JamesWell on 2016-07-07 10:15:21 UTC
leg_tracker-indigo/Leg
is indeed not a legal name: dashes are not allowed in ROS (resource) names. I don't know why it's using the name of the folder here, but I'd try removing / changing the-
and see whether it works then.Asked by gvdhoorn on 2016-07-07 11:21:45 UTC