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

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 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

  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:


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

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:

  message(STATUS "+++ catkin")
  "List of projects to build, or ALL for all.  Use to completely exclude certain projects from cmake traversal.")

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:


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://', 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


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" it is giving me this error. I am following these steps: cd osrf-common . /opt/ros/fuerte/ 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 ( 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


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

Seen: 2,382 times

Last updated: Jul 10 '12