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

Do I need to source fuerte setup.bash before using catkin?

asked 2012-07-10 04:35:16 -0500

michikarg gravatar image

Hi, i just tried to install ROS Fuerte core libraries to use them as an overlay. I did so using the instructions from http://www.ros.org/wiki/fuerte/Installation/Ubuntu/Source section 1.5.1. But when i try to do:

cmake .. -DCMAKE_INSTALL_PREFIX=~/home/local/ros_fuerte

I am getting the error:

CMake Warning at CMakeLists.txt:25 (find_package):
  Could not find module Findcatkin.cmake or a configuration file for package
  catkin.

  Adjust CMAKE_MODULE_PATH to find Findcatkin.cmake or set catkin_DIR to the
  directory containing a CMake configuration file for catkin.  The file will
  have one of the following names:

    catkinConfig.cmake
    catkin-config.cmake



CMake Error at CMakeLists.txt:28 (catkin_workspace):
  Unknown CMake command "catkin_workspace".

When source /opt/ros/fuerte/setup.bash , the error disappears. But isn't this behaviour strange since the instructions are about installing ROS from source or am I missing something here?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-07-10 23:31:21 -0500

KruseT gravatar image

This is a Cmake error as a result of a call like:

find_package(catkin REQUIRED)

in some CMakelists.txt

If you run rosinstall --catkin ... rosinstall should generate a CMakelists.txt containing something like this in your workspace:

if (IS_DIRECTORY ${CMAKE_SOURCE_DIR}/catkin)
  message(STATUS "+++ catkin")
  set(CATKIN_BUILD_PROJECTS "ALL" CACHE STRING
  "List of projects to build, or ALL for all.  Use to completely exclude certain projects from cmake traversal.")
  add_subdirectory(catkin)
else()
  find_package(catkin)
endif()

So in your case, the if statement was false, so add_subdirectory(catkin) was not executed, which caused 'find_package(catkin REQUIRED)', which is used in some other CMakelists.txt, to fail.

The variable ${CMAKE_SOURCE_DIR} is set by cmake and should point to your workspace. To debug, add a line like this to the CMakelists.txt in your workspace:

message(STATUS ${CMAKE_SOURCE_DIR})

The result should look like:

/build $ cmake .. -DCMAKE_INSTALL_PREFIX=...
-- workspace: .../fuerte_underlay
-- +++ catkin

So check that in your workspace, there is a folder called 'catkin'. Your .rosinstall file should contain the line:

- git: {local-name: catkin, uri: 'git://github.com/wg-debs/catkin-release.git', version: debian/ros-fuerte-catkin_0.4.4_lucid}

and this should lead to the rosinstall command to download catkin. If the error persists, please copy more of the log you get.

edit flag offensive delete link more

Comments

Apparently there was no catkin-folder in my workspace and CMAKE_SOURCE_DIR was not set which caused the if statement to become false. Adding catkin to my rosinstall solved it for me...

michikarg gravatar image michikarg  ( 2012-07-11 03:57:57 -0500 )edit

I am trying to install some packages on fuerte version and getting the same error. I do not know how to add catkin to rosinstall. I am new to ROS please guide me. Thanks in advance

Jainendra gravatar image Jainendra  ( 2013-10-08 05:56:04 -0500 )edit

No user package should use catkin in Fuerte. Only some core packages use catkin in Fuerte since it was not public API at that time and is significantly different than catkin in Groovy and Hydro. Most of the docs you will find about catkin does not apply to catkin.

Dirk Thomas gravatar image Dirk Thomas  ( 2013-10-08 07:16:57 -0500 )edit

That should probably read "Most of the docs you will find about catkin do not apply to the Fuerte version of catkin."

William gravatar image William  ( 2013-10-08 07:34:50 -0500 )edit

I also came to know the same thing but when I am trying to install osrf-common package from "hg clone https://bitbucket.org/osrf/osrf-common" it is giving me this error. I am following these steps: cd osrf-common . /opt/ros/fuerte/setup.sh export ROS_PACKAGE_PATH=`pwd`:$ROS_PACKAGE_PATH mkdir build cd build cmake .. make sudo make install And it is while doing cmake .. I am getting the errror. Sorry about poor formating but I am learning to post as well.

Jainendra gravatar image Jainendra  ( 2013-10-08 07:57:11 -0500 )edit

The osrf_msgs package on the default branch of that repository contains a package.xml file (https://bitbucket.org/osrf/osrf-common/src/12e5b2a24d90e621c6318ab9cb7c72ae49eaa252/osrf_msgs/package.xml?at=default) which indicates that this packages is only for Groovy and newer. You can not use that checkout with Fuerte.

Dirk Thomas gravatar image Dirk Thomas  ( 2013-10-08 08:04:22 -0500 )edit

Question Tools

Stats

Asked: 2012-07-10 04:35:16 -0500

Seen: 2,393 times

Last updated: Jul 10 '12