ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

CMake error with move_base_msgs

asked 2014-08-01 15:58:41 -0600

choog gravatar image

updated 2014-08-05 09:14:25 -0600

Hello,

I am trying to run this tutorial http://wiki.ros.org/navigation/Tutori... . 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 ...
(more)
edit retag flag offensive close merge delete

Comments

Can you post the CMake and package of your simple_navigation_goals package, please?

David Lu gravatar image David Lu  ( 2014-08-01 17:02:47 -0600 )edit

Your talking about the whole code? Where is the CMake file located?

choog gravatar image choog  ( 2014-08-01 19:47:35 -0600 )edit

Both should be in the root of your package.

David Lu gravatar image David Lu  ( 2014-08-01 20:32:12 -0600 )edit

can you post the package.xml file please?

Moda gravatar image Moda  ( 2014-08-04 09:09:16 -0600 )edit

I've added just about all the files now.

choog gravatar image choog  ( 2014-08-04 10:22:34 -0600 )edit

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.

choog gravatar image choog  ( 2014-08-04 10:30:47 -0600 )edit

Can you please post the CmakeLists.txt that is in the same folder as your package.xml?

David Lu gravatar image David Lu  ( 2014-08-04 14:15:51 -0600 )edit

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.

choog gravatar image choog  ( 2014-08-05 09:15:29 -0600 )edit

5 Answers

Sort by ยป oldest newest most voted
3

answered 2014-08-05 11:45:13 -0600

choog gravatar image

I figured out the problem. The problem is that move_base_msgs only works with rosbuild. This package does not work with catkin. For anyone out there with this issue in the future just create your package with rosbuild.

How can I notify the people managing the ros wiki to make a note of that for people to know right away to use rosbuild or to download the catkinized move_base_msgs packages.

edit flag offensive delete link more

Comments

That shouldn't be true. Which version of ROS/Navigation are you using?

David Lu gravatar image David Lu  ( 2014-08-05 12:51:53 -0600 )edit

How can I find this out? I know I am using ros groovy

choog gravatar image choog  ( 2014-08-05 13:19:42 -0600 )edit

My CMakeLists.txt file for my navigation stack says: VERSION 2.4.6

choog gravatar image choog  ( 2014-08-05 13:20:51 -0600 )edit
1

Navigation for Groovy is built in rosbuild. You can't build catkin packages on top of rosbuild packages.

David Lu gravatar image David Lu  ( 2014-08-05 13:54:19 -0600 )edit
2

answered 2018-07-09 06:40:30 -0600

asukiaaa gravatar image

Same error occurred at building navigation from source for melodic.
I resolved the problem by putting navigation_msgs to src directory of catkin work space.

cd ~/ros_catkin_ws/src
git clone https://github.com/ros-planning/navigation_msgs.git
edit flag offensive delete link more

Comments

2

Thanks. It had worked for me in melodic version.

Dhinesh gravatar image Dhinesh  ( 2018-10-23 10:38:10 -0600 )edit

Worked for me too

VladKrav gravatar image VladKrav  ( 2021-05-24 11:39:09 -0600 )edit
0

answered 2014-08-05 09:48:44 -0600

David Lu gravatar image

What happens when you uncomment this line: # CATKIN_DEPENDS actionlib move_base_msgs roscp

edit flag offensive delete link more

Comments

Still the same error.

choog gravatar image choog  ( 2014-08-05 10:06:48 -0600 )edit
0

answered 2023-05-10 00:55:56 -0600

sudo apt-get install ros-noetic-move-base-msgs

Try this after putting navigation_msgs to src directory of catkin work space.

edit flag offensive delete link more
0

answered 2014-08-06 02:47:10 -0600

Moda gravatar image

What happen if in package.xml and in CMakeLists you delete the dependancie of move_base_msgs?

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-08-01 15:58:41 -0600

Seen: 11,821 times

Last updated: Aug 06 '14