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

find_package(catkin) fails in Hydro

asked 2013-11-01 06:21:44 -0500

teddybouch gravatar image

I am trying to move some packages made in Groovy to Hydro, which I just finished installing. After struggling to convert my previous workspace, I am trying to start again fresh, so following the tutorial I

source /opt/ros/hydro/setup.bash
mkdir -p ~/iar_ws_hydro/src
cd ~/iar_ws_hydro/src
cd ~/iar_ws_hydro/
catkin_make

However, when I run the catkin_make command in my brand new folder, it seems to recognize the command and start setting up the workspace, but then fails to find the catkin package. Here's the output:

abouchard@linux-z28r:~/iar_ws_hydro> catkin_make
Base path: /home/abouchard/iar_ws_hydro
Source space: /home/abouchard/iar_ws_hydro/src
Build space: /home/abouchard/iar_ws_hydro/build
Devel space: /home/abouchard/iar_ws_hydro/devel
Install space: /home/abouchard/iar_ws_hydro/install
####
#### Running command: "cmake /home/abouchard/iar_ws_hydro/src -DCATKIN_DEVEL_PREFIX=/home/abouchard/iar_ws_hydro/devel -DCMAKE_INSTALL_PREFIX=/home/abouchard/iar_ws_hydro/install" in "/home/abouchard/iar_ws_hydro/build"
####
-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at CMakeLists.txt:44 (message):
  find_package(catkin) failed.  catkin was neither found in the workspace nor
  in the CMAKE_PREFIX_PATH.  One reason may be that no ROS setup.sh was
  sourced before.


-- Configuring incomplete, errors occurred!                                                                                                                 
Invoking "cmake" failed

I have to confess to being totally lost on this one. Obviously catkin is installed because it recognizes the catkin_make command, and the setup.bash calls setup.sh. $CMAKE_PREFIX_PATH contains /opt/ros/hydro:/home/abouchard/ros_catkin_ws/install_isolated, and I can confirm that there are a whole mess of catkin executables in /opt/ros/hydro/bin if that helps.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
1

answered 2013-11-01 10:22:49 -0500

teddybouch gravatar image

The problem was that I was building locally and manually moving the contents of the install_isolated directory to /opt/ros/hydro/, with the result that my paths were not properly configured and packages not properly installed. When I wiped out my installation entirely and rebuilt using the --install-space flag, everything worked fine and didn't give any errors.

edit flag offensive delete link more
1

answered 2013-11-01 08:12:27 -0500

thebyohazard gravatar image

I don't see it in the tutorials anymore, but there's a command (at least there was in groovy) called catkin_init_workspace that I was under the impression needed to be run in the overall catkin workspace (not the src folder) before catkin_make was run. Things might have changed, but it's worth looking into.

$ catkin_init_workspace -h
usage: catkin_init_workspace [-h] [workspace]

Initializes a catkin workspace by creating a top-level CMakeLists.txt.

positional arguments:
  workspace   The path to an existing folder (default: .)

optional arguments:
  -h, --help  show this help message and exit
edit flag offensive delete link more

Comments

I figured out what it was, and was able to get it to work without this, so I'm guessing the functionality was moved into the general catkin_make with hydro. Thanks, though!

teddybouch gravatar image teddybouch  ( 2013-11-01 10:19:35 -0500 )edit
0

answered 2013-11-01 16:38:47 -0500

doudoushuixiu gravatar image

catkin is not easy to understand.i'm learning catkin today.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-11-01 06:21:44 -0500

Seen: 7,041 times

Last updated: Nov 01 '13