X-Git-Url: https://defiant.homedns.org/gitweb/?p=ros_wild_thumper.git;a=blobdiff_plain;f=CMakeLists.txt;h=999926aa31b0646b2ae5fe286142d0ebfa80760e;hp=c35ceaf9a5546a1e02055e6e7b780ac83a69bd9d;hb=3d10c26a464468169ace654c14a29d26cbda13e8;hpb=dcdf9baa260c03d34c55339af9950155319c41f0 diff --git a/CMakeLists.txt b/CMakeLists.txt index c35ceaf..999926a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,12 @@ cmake_minimum_required(VERSION 2.8.3) project(wild_thumper) +EXECUTE_PROCESS( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE ) ## Find catkin macros and libraries ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) ## is used, also find other catkin packages -find_package(catkin REQUIRED) +find_package(catkin REQUIRED sensor_msgs cv_bridge roscpp rospy std_msgs image_transport dynamic_reconfigure message_generation rosruby tf) +find_package(OpenCV) ## System dependencies are found with CMake's conventions # find_package(Boost REQUIRED COMPONENTS system) @@ -13,7 +15,7 @@ find_package(catkin REQUIRED) ## Uncomment this if the package has a setup.py. This macro ensures ## modules and global scripts declared therein get installed ## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html -# catkin_python_setup() +catkin_python_setup() ################################################ ## Declare ROS messages, services and actions ## @@ -40,18 +42,18 @@ find_package(catkin REQUIRED) ## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) ## Generate messages in the 'msg' folder -# add_message_files( -# FILES -# Message1.msg -# Message2.msg -# ) +add_message_files( + FILES + LedStripe.msg + Led.msg + Sensor.msg +) ## Generate services in the 'srv' folder -# add_service_files( -# FILES -# Service1.srv -# Service2.srv -# ) +add_service_files( + FILES + DWM1000Center.srv +) ## Generate actions in the 'action' folder # add_action_files( @@ -61,10 +63,18 @@ find_package(catkin REQUIRED) # ) ## Generate added messages and services with any dependencies listed here -# generate_messages( -# DEPENDENCIES -# std_msgs # Or other packages containing msgs -# ) +generate_messages( + DEPENDENCIES + std_msgs # Or other packages containing msgs +) + +rosruby_setup() +rosruby_generate_messages(fiducial_msgs) + +generate_dynamic_reconfigure_options( + config/PathFollowing.cfg + config/WildThumper.cfg +) ################################### ## catkin specific configuration ## @@ -78,8 +88,9 @@ find_package(catkin REQUIRED) catkin_package( # INCLUDE_DIRS include # LIBRARIES wild_thumper -# CATKIN_DEPENDS other_catkin_pkg +# CATKIN_DEPENDS sensor_msgs # DEPENDS system_lib + CATKIN_DEPENDS message_runtime ) ########### @@ -88,7 +99,9 @@ catkin_package( ## Specify additional locations of header files ## Your package locations should be listed before other locations -# include_directories(include) +include_directories( + ${catkin_INCLUDE_DIRS} +) ## Declare a cpp library # add_library(wild_thumper @@ -96,16 +109,24 @@ catkin_package( # ) ## Declare a cpp executable -# add_executable(wild_thumper_node src/wild_thumper_node.cpp) +add_executable(path_following src/path_following.cpp) ## Add cmake target dependencies of the executable/library ## as an example, message headers may need to be generated before nodes -# add_dependencies(wild_thumper_node wild_thumper_generate_messages_cpp) +add_dependencies(path_following ${PROJECT_NAME}_gencfg) ## Specify libraries to link a library or executable target against -# target_link_libraries(wild_thumper_node -# ${catkin_LIBRARIES} -# ) +target_link_libraries(path_following + ${catkin_LIBRARIES} + ${OpenCV_LIBS} +) +if(${ARCHITECTURE} EQUAL "armv7l") + add_executable(wt_node src/wt_node.cpp) + target_link_libraries(wt_node + ${catkin_LIBRARIES} + i2c + ) +endif() ############# ## Install ##