ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

[Groovy Beta] Troubles migrating to catkin

asked 2012-12-02 02:55:22 -0600

Kevin gravatar image

updated 2012-12-03 15:38:59 -0600

I installed the groovy base packages following these instructions. I want to convert my packages (I wrote) to catkin so they are "groovy". However, when I run catkin_make, nothing gets built.

I converted my manifest.xml to a package.xml:

<?xml version="1.0"?>

  <maintainer email="kevin@todo.todo">kevin</maintainer>



  <!-- The export tag contains other, unspecified, tags -->
    <!-- You can specify that this package is a metapackage here: -->
    <!-- <metapackage/> -->

    <!-- Other tools can request additional information be placed here -->


My CMakeLists.txt is:

cmake_minimum_required(VERSION 2.8.3)

## Find catkin and system dependencies

## Find catkin and any catkin packages on which
## this package depends at build time
find_package(catkin REQUIRED COMPONENTS roscpp)

## Declare ROS messages and services

## Generate services in the 'srv' folder

## Generate added messages and services with any dependencies listed here
generate_messages(DEPENDENCIES std_msgs)

## Declare things to be passed to other projects
  INCLUDE_DIRS include
  CATKIN_DEPENDS roscpp std_msgs # catkin-pkg1 catkin-pkg2
#  DEPENDS Boost # other-3rd-party-libraries

## Specify additional locations of header files
include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS})

## Declare a cpp executable
add_executable(serial_node src/serial_node_service.cpp)

I have sourced setup.bash and my environment is:

[kevin@tardis serial_node]$ env | grep ROS

In the package directory, when I run catkin_make I don't get any binaries in the devel or build folder.

[kevin@tardis serial_node]$ catkin_make
Base path: /Users/kevin/ros_sandbox/serial_node
Source space: /Users/kevin/ros_sandbox/serial_node/src
Build space: /Users/kevin/ros_sandbox/serial_node/build
Devel space: /Users/kevin/ros_sandbox/serial_node/devel
Install space: /Users/kevin/ros_sandbox/serial_node/install
#### Running command: "cmake /Users/kevin/ros_sandbox/serial_node/src -DCATKIN_DEVEL_PREFIX=/Users/kevin/ros_sandbox/serial_node/devel -DCMAKE_INSTALL_PREFIX=/Users/kevin/ros_sandbox/serial_node/install" in "/Users/kevin/ros_sandbox/serial_node/build"
-- The C compiler identification is Clang 4.1.0
-- The CXX compiler identification is Clang 4.1.0
-- 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
-- Using CATKIN_DEVEL_PREFIX: /Users/kevin/ros_sandbox/serial_node/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/groovy
-- This workspace overlays: /opt/ros/groovy
-- Found PythonInterp: /usr/bin/python (found version "2.7.2") 
-- Found PY_em: /Library/Python/2.7/site-packages/em.pyc  
-- Found gtest: gtests will be built
-- catkin 0.5.52
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/kevin/ros_sandbox/serial_node/build
#### Running command: "make -j2" in "/Users/kevin/ros_sandbox ...
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-12-03 15:57:46 -0600

jbohren gravatar image

Kevin, does this clear up any of the confusion?

edit flag offensive delete link more



Yes, it helps ... things are beginning to compile ... this is much different than I had thought. I was mainly reading the migration stuff ...

Kevin gravatar image Kevin  ( 2012-12-03 16:11:37 -0600 )edit

Yeah, this is a page where I've been trying to maintain a catkin brief for those who just want to skip all the design details. If you find anything in catkin or the official documentation confusing or counter-intuitive, please comment on it here.

jbohren gravatar image jbohren  ( 2012-12-03 16:15:28 -0600 )edit

answered 2012-12-02 23:58:09 -0600

KruseT gravatar image

catkin_make does not behave like rosmake. You have to go into your workspace folder (/Users/kevin/ros_sandbox) and run it from there. Also, delete the folder /Users/kevin/ros_sandbox/serial_node/build.

edit flag offensive delete link more



I tried that, but it doesn't work. My source code is located at ~/ros_sandbox/serial_node/src ... my workspace should be at the serial_node level with build, devel, src all there. If this isn't correct I am confused. This also isn't clear.

Kevin gravatar image Kevin  ( 2012-12-03 14:15:32 -0600 )edit

So, you are saying that my source files ( eg, some_file.cpp) is not stored in the package, but up a level? That makes no sense.

Kevin gravatar image Kevin  ( 2012-12-03 15:30:34 -0600 )edit

Please see the above linked docs to clarify how a catkin workspace looks like and the terms for the different folders. The previous comment referred to the "src" folder of the workspace. Your package should be checked out in there. Then catkin_make is invoked in the root of the workspace.

Dirk Thomas gravatar image Dirk Thomas  ( 2012-12-05 15:31:40 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-12-02 02:55:22 -0600

Seen: 1,407 times

Last updated: Dec 03 '12