Hello,
I am trying to run this tutorial http://wiki.ros.org/navigation/Tutorials/SendingSimpleGoals. For some reason I keep getting this error: By the way I am running groovy and ubuntu 12.04
CMake Error at /opt/ros/groovy/share/catkin/cmake/catkinConfig.cmake:72 (find_package):
Could not find a configuration file for package move_base_msgs.
Set move_base_msgs_DIR to the directory containing a CMake configuration
file for move_base_msgs. The file will have one of the following names:
move_base_msgsConfig.cmake
move_base_msgs-config.cmake
Call Stack (most recent call first):
simple_navigation_goals/CMakeLists.txt:7 (find_package)
-- Configuring incomplete, errors occurred!
Invoking "cmake" failed
I run rospack find move_base_msgs and it finds the package under :
ubuntu@ubuntu:~/catkin_ws$ rospack find move_base_msgs
/opt/ros/groovy/stacks/navigation/move_base_msgs
I have looked for the config file cmake is asking for but I don't see it anywhere. even tried reinstalling the navigation package completely to see if there was a file that I deleted by accident:
ubuntu@ubuntu:~/catkin_ws$ sudo apt-get install ros-groovy-navigation
Reading package lists... Done
Building dependency tree
Reading state information... Done
ros-groovy-navigation is already the newest version.
ros-groovy-navigation set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 167 not upgraded.
ubuntu@ubuntu:~/catkin_ws$
Nothing though, I still get the CMake error after doing this.
If anyone has any insight as to what is wrong please let me know.
This is my simple_navigation_goalsConfig-version.cmake
# generated from catkin/cmake/template/pkgConfig-version.cmake.in
set(PACKAGE_VERSION "0.0.0")
set(PACKAGE_VERSION_EXACT False)
set(PACKAGE_VERSION_COMPATIBLE False)
if("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "${PACKAGE_VERSION}")
set(PACKAGE_VERSION_EXACT True)
set(PACKAGE_VERSION_COMPATIBLE True)
endif()
if("${PACKAGE_FIND_VERSION}" VERSION_LESS "${PACKAGE_VERSION}")
set(PACKAGE_VERSION_COMPATIBLE True)
endif()
This is my simple_navigation_goalsConfig.cmake
# generated from catkin/cmake/template/pkgConfig.cmake.in
# append elements to a list and remove existing duplicates from the list
# copied from catkin/cmake/list_append_deduplicate.cmake to keep pkgConfig
# self contained
macro(_list_append_deduplicate listname)
if(NOT "${ARGN}" STREQUAL "")
if(${listname})
list(REMOVE_ITEM ${listname} ${ARGN})
endif()
list(APPEND ${listname} ${ARGN})
endif()
endmacro()
# append elements to a list if they are not already in the list
# copied from catkin/cmake/list_append_unique.cmake to keep pkgConfig
# self contained
macro(_list_append_unique listname)
foreach(_item ${ARGN})
list(FIND ${listname} ${_item} _index)
if(_index EQUAL -1)
list(APPEND ${listname} ${_item})
endif()
endforeach()
endmacro()
# pack a list of libraries with optional build configuration keywords
# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig
# self contained
macro(_pack_libraries_with_build_configuration VAR)
set(${VAR} "")
set(_argn ${ARGN})
list(LENGTH _argn _count)
set(_index 0)
while(${_index} LESS ${_count})
list(GET _argn ${_index} lib)
if("${lib}" MATCHES "^debug|optimized|general$")
math(EXPR _index "${_index} + 1")
if(${_index} EQUAL ${_count})
message(FATAL_ERROR "_pack_libraries_with_build_configuration() the list of libraries '${ARGN}' ends with '${lib}' which is a build configuration keyword and must be followed by a library")
endif()
list(GET _argn ${_index} library)
list(APPEND ${VAR} "${lib}${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}${library}")
else()
list(APPEND ${VAR} "${lib}")
endif()
math(EXPR _index "${_index} + 1")
endwhile()
endmacro()
# unpack a list of libraries with optional build configuration keyword prefixes
# copied from catkin/cmake/catkin_libraries.cmake to keep pkgConfig
# self contained
macro(_unpack_libraries_with_build_configuration VAR)
set(${VAR} "")
foreach(lib ${ARGN})
string(REGEX REPLACE "^(debug|optimized|general)${CATKIN_BUILD_CONFIGURATION_KEYWORD_SEPARATOR}(.+)$" "\\1;\\2" lib "${lib}")
list(APPEND ${VAR} "${lib}")
endforeach()
endmacro()
if(simple_navigation_goals_CONFIG_INCLUDED)
return()
endif()
set(simple_navigation_goals_CONFIG_INCLUDED TRUE)
# set variables for source/devel/install prefixes
if("TRUE" STREQUAL "TRUE")
set(simple_navigation_goals_SOURCE_PREFIX /home/ubuntu/catkin_ws/src/simple_navigation_goals)
set(simple_navigation_goals_DEVEL_PREFIX /home/ubuntu/catkin_ws/devel)
set(simple_navigation_goals_INSTALL_PREFIX "")
set(simple_navigation_goals_PREFIX ${simple_navigation_goals_DEVEL_PREFIX})
else()
set(simple_navigation_goals_SOURCE_PREFIX "")
set(simple_navigation_goals_DEVEL_PREFIX "")
set(simple_navigation_goals_INSTALL_PREFIX /home/ubuntu/catkin_ws/install)
set(simple_navigation_goals_PREFIX ${simple_navigation_goals_INSTALL_PREFIX})
endif()
# warn when using a deprecated package
if(NOT "" STREQUAL "")
set(_msg "WARNING: package 'simple_navigation_goals' is deprecated")
# append custom deprecation text if available
if(NOT "" STREQUAL "TRUE")
set(_msg "${_msg} ()")
endif()
message("${_msg}")
endif()
# flag project as catkin-based to distinguish if a find_package()-ed project is a catkin project
set(simple_navigation_goals_FOUND_CATKIN_PROJECT TRUE)
if(NOT "" STREQUAL "")
set(simple_navigation_goals_INCLUDE_DIRS "")
set(_include_dirs "")
foreach(idir ${_include_dirs})
if(IS_ABSOLUTE ${idir} AND IS_DIRECTORY ${idir})
set(include ${idir})
elseif("${idir}" STREQUAL "include")
get_filename_component(include "${simple_navigation_goals_DIR}/../../../include" ABSOLUTE)
if(NOT IS_DIRECTORY ${include})
message(FATAL_ERROR "Project 'simple_navigation_goals' specifies '${idir}' as an include dir, which is not found. It does not exist in '${include}'. Ask the maintainer 'ubuntu <[email protected]>' to fix it.")
endif()
else()
message(FATAL_ERROR "Project 'simple_navigation_goals' specifies '${idir}' as an include dir, which is not found. It does neither exist as an absolute directory nor in '/home/ubuntu/catkin_ws/src/simple_navigation_goals/${idir}'. Ask the maintainer 'ubuntu <[email protected]>' to fix it.")
endif()
_list_append_unique(simple_navigation_goals_INCLUDE_DIRS ${include})
endforeach()
endif()
set(libraries "")
foreach(library ${libraries})
# keep build configuration keywords, target names and absolute libraries as-is
if("${library}" MATCHES "^debug|optimized|general$")
list(APPEND simple_navigation_goals_LIBRARIES ${library})
elseif(TARGET ${library})
list(APPEND simple_navigation_goals_LIBRARIES ${library})
elseif(IS_ABSOLUTE ${library})
list(APPEND simple_navigation_goals_LIBRARIES ${library})
else()
set(lib_path "")
set(lib "${library}-NOTFOUND")
# since the path where the library is found is returned we have to iterate over the paths manually
foreach(path /home/ubuntu/catkin_ws/devel/lib;/home/ubuntu/catkin_ws/devel/lib;/opt/ros/groovy/lib)
find_library(lib ${library}
PATHS ${path}
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
if(lib)
set(lib_path ${path})
break()
endif()
endforeach()
if(lib)
_list_append_unique(simple_navigation_goals_LIBRARY_DIRS ${lib_path})
list(APPEND simple_navigation_goals_LIBRARIES ${lib})
else()
# as a fall back for non-catkin libraries try to search globally
find_library(lib ${library})
if(NOT lib)
message(FATAL_ERROR "Project '${PROJECT_NAME}' tried to find library '${library}'. The library is neither a target nor built/installed properly. Did you compile project 'simple_navigation_goals'? Did you find_package() it before the subdirectory containing its code is included?")
endif()
list(APPEND simple_navigation_goals_LIBRARIES ${lib})
endif()
endif()
endforeach()
set(simple_navigation_goals_EXPORTED_TARGETS "")
# create dummy targets for exported code generation targets to make life of users easier
foreach(t ${simple_navigation_goals_EXPORTED_TARGETS})
if(NOT TARGET ${t})
add_custom_target(${t})
endif()
endforeach()
set(depends "")
foreach(depend ${depends})
string(REPLACE " " ";" depend_list ${depend})
# the package name of the dependency must be kept in a unique variable so that it is not overwritten in recursive calls
list(GET depend_list 0 simple_navigation_goals_dep)
list(LENGTH depend_list count)
if(${count} EQUAL 1)
# simple dependencies must only be find_package()-ed once
if(NOT ${simple_navigation_goals_dep}_FOUND)
find_package(${simple_navigation_goals_dep} REQUIRED)
endif()
else()
# dependencies with components must be find_package()-ed again
list(REMOVE_AT depend_list 0)
find_package(${simple_navigation_goals_dep} REQUIRED ${depend_list})
endif()
_list_append_unique(simple_navigation_goals_INCLUDE_DIRS ${${simple_navigation_goals_dep}_INCLUDE_DIRS})
# merge build configuration keywords with library names to correctly deduplicate
_pack_libraries_with_build_configuration(simple_navigation_goals_LIBRARIES ${simple_navigation_goals_LIBRARIES})
_pack_libraries_with_build_configuration(_libraries ${${simple_navigation_goals_dep}_LIBRARIES})
_list_append_deduplicate(simple_navigation_goals_LIBRARIES ${_libraries})
# undo build configuration keyword merging after deduplication
_unpack_libraries_with_build_configuration(simple_navigation_goals_LIBRARIES ${simple_navigation_goals_LIBRARIES})
_list_append_unique(simple_navigation_goals_LIBRARY_DIRS ${${simple_navigation_goals_dep}_LIBRARY_DIRS})
list(APPEND simple_navigation_goals_EXPORTED_TARGETS ${${simple_navigation_goals_dep}_EXPORTED_TARGETS})
endforeach()
set(pkg_cfg_extras "")
foreach(extra ${pkg_cfg_extras})
if(NOT IS_ABSOLUTE ${extra})
set(extra ${simple_navigation_goals_DIR}/${extra})
endif()
include(${extra})
endforeach()
This is my simple_navigation_goals.pc file
prefix=/home/ubuntu/catkin_ws/devel
Name: simple_navigation_goals
Description: Description of simple_navigation_goals
Version: 0.0.0
Cflags:
Libs: -L/home/ubuntu/catkin_ws/devel/lib
Requires:
package.xml
<?xml version="1.0"?>
<package>
<name>simple_navigation_goals</name>
<version>0.0.0</version>
<description>The simple_navigation_goals package</description>
<!-- One maintainer tag required, multiple allowed, one person per tag -->
<!-- Example: -->
<!-- <maintainer email="[email protected]">Jane Doe</maintainer> -->
<maintainer email="[email protected]">ubuntu</maintainer>
<!-- One license tag required, multiple allowed, one license per tag -->
<!-- Commonly used license strings: -->
<!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
<license>TODO</license>
<!-- Url tags are optional, but mutiple are allowed, one per tag -->
<!-- Optional attribute type can be: website, bugtracker, or repository -->
<!-- Example: -->
<!-- <url type="website">http://wiki.ros.org/simple_navigation_goals</url> -->
<!-- Author tags are optional, mutiple are allowed, one per tag -->
<!-- Authors do not have to be maintianers, but could be -->
<!-- Example: -->
<!-- <author email="[email protected]">Jane Doe</author> -->
<!-- The *_depend tags are used to specify dependencies -->
<!-- Dependencies can be catkin packages or system dependencies -->
<!-- Examples: -->
<!-- Use build_depend for packages you need at compile time: -->
<!-- <build_depend>message_generation</build_depend> -->
<!-- Use buildtool_depend for build tool packages: -->
<!-- <buildtool_depend>catkin</buildtool_depend> -->
<!-- Use run_depend for packages you need at runtime: -->
<!-- <run_depend>message_runtime</run_depend> -->
<!-- Use test_depend for packages you need only for testing: -->
<!-- <test_depend>gtest</test_depend> -->
<buildtool_depend>catkin</buildtool_depend>
<build_depend>actionlib</build_depend>
<build_depend>move_base_msgs</build_depend>
<build_depend>roscp</build_depend>
<run_depend>actionlib</run_depend>
<run_depend>move_base_msgs</run_depend>
<run_depend>roscp</run_depend>
<!-- The export tag contains other, unspecified, tags -->
<export>
<!-- You can specify that this package is a metapackage here: -->
<!-- <metapackage/> -->
<!-- Other tools can request additional information be placed here -->
</export>
</package>
Here is my CMakeLists.txt file:
cmake_minimum_required(VERSION 2.8.3)
project(simple_navigation_goals)
## 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 COMPONENTS
actionlib
move_base_msgs
roscpp
)
## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)
## 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()
################################################
## Declare ROS messages, services and actions ##
################################################
## To declare and build messages, services or actions from within this
## package, follow these steps:
## * Let MSG_DEP_SET be the set of packages whose message types you use in
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
## * In the file package.xml:
## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET
## * If MSG_DEP_SET isn't empty the following dependencies might have been
## pulled in transitively but can be declared for certainty nonetheless:
## * add a build_depend tag for "message_generation"
## * add a run_depend tag for "message_runtime"
## * In this file (CMakeLists.txt):
## * add "message_generation" and every package in MSG_DEP_SET to
## find_package(catkin REQUIRED COMPONENTS ...)
## * add "message_runtime" and every package in MSG_DEP_SET to
## catkin_package(CATKIN_DEPENDS ...)
## * uncomment the add_*_files sections below as needed
## and list every .msg/.srv/.action file to be processed
## * uncomment the generate_messages entry below
## * 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
# )
## Generate services in the 'srv' folder
# add_service_files(
# FILES
# Service1.srv
# Service2.srv
# )
## Generate actions in the 'action' folder
# add_action_files(
# FILES
# Action1.action
# Action2.action
# )
## Generate added messages and services with any dependencies listed here
# generate_messages(
# DEPENDENCIES
# move_base_msgs
# )
###################################
## catkin specific configuration ##
###################################
## The catkin_package macro generates cmake config files for your package
## Declare things to be passed to dependent projects
## INCLUDE_DIRS: uncomment this if you package contains header files
## LIBRARIES: libraries you create in this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
# INCLUDE_DIRS include
# LIBRARIES simple_navigation_goals
# CATKIN_DEPENDS actionlib move_base_msgs roscp
# DEPENDS system_lib
)
###########
## Build ##
###########
## 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(simple_navigation_goals
# src/${PROJECT_NAME}/simple_navigation_goals.cpp
# )
## Declare a cpp executable
add_executable(simple_navigation_goals src/simple_navigation_goals.cpp)
## Add cmake target dependencies of the executable/library
## as an example, message headers may need to be generated before nodes
# add_dependencies(simple_navigation_goals_node simple_navigation_goals_generate_messages_cpp)
## Specify libraries to link a library or executable target against
target_link_libraries(simple_navigation_goals
${catkin_LIBRARIES}
)
#############
## Install ##
#############
# all install targets should use catkin DESTINATION variables
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
## Mark executable scripts (Python etc.) for installation
## in contrast to setup.py, you can choose the destination
# install(PROGRAMS
# scripts/my_python_script
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )
## Mark executables and/or libraries for installation
# install(TARGETS simple_navigation_goals simple_navigation_goals_node
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )
## Mark cpp header files for installation
# install(DIRECTORY include/${PROJECT_NAME}/
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
# FILES_MATCHING PATTERN "*.h"
# PATTERN ".svn" EXCLUDE
# )
## Mark other files for installation (e.g. launch and bag files, etc.)
# install(FILES
# # myfile1
# # myfile2
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
# )
#############
## Testing ##
#############
## Add gtest based cpp test target and link libraries
# catkin_add_gtest(${PROJECT_NAME}-test test/test_simple_navigation_goals.cpp)
# if(TARGET ${PROJECT_NAME}-test)
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
# endif()
## Add folders to be run by python nosetests
# catkin_add_nosetests(test)
Originally posted by choog on ROS Answers with karma: 101 on 2014-08-01
Post score: 1
Original comments
Comment by David Lu on 2014-08-01:
Can you post the CMake and package of your simple_navigation_goals package, please?
Comment by choog on 2014-08-01:
Your talking about the whole code?
Where is the CMake file located?
Comment by David Lu on 2014-08-01:
Both should be in the root of your package.
Comment by Moda on 2014-08-04:
can you post the package.xml file please?
Comment by choog on 2014-08-04:
I've added just about all the files now.
Comment by choog on 2014-08-04:
I also noticed that my move_base_msgs package is located under my stack/navigation/move_base_msgs folder. This package does not have a cmake folder therefore there is no move_base_msgs.cmake file.
Comment by David Lu on 2014-08-04:
Can you please post the CmakeLists.txt that is in the same folder as your package.xml?
Comment by choog on 2014-08-05:
I have updated my post and you can see my CMakeLists.txt file. It is in the same folder as my package.xml.
So far this is the only tutorial that has given me issues like that.