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

Change CMakeLists.txt from rosbuild to catkin [closed]

asked 2014-07-24 16:13:21 -0500

anamcarvalho gravatar image

updated 2022-01-22 16:16:28 -0500

Evgeny gravatar image

Hi everyone!

I would appreciate if someone could help me correct this CMakeLists.txt from rosbuild to catkin!

Thank you for your time!

cmake_minimum_required(VERSION 2.4.6)


#set the default path for built executables to the "bin" directory
#set the default path for built libraries to the "lib" directory

# add dynamic reconfigure api

rosbuild_add_executable(pcl_decimator src/pcl_decimator.cpp)


In the node of the package, there is an include which says it cannot be found:

#include <pcl_decimator/PCLDecimatorConfig.h>

The package only has one .cpp file in src folder, and has a .cfg file in the cfg folder... Why can't he found this? Is this a migration problem?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by anamcarvalho
close date 2014-08-28 15:23:24.094138

1 Answer

Sort by ยป oldest newest most voted

answered 2014-07-24 16:24:46 -0500

ahendrix gravatar image

updated 2014-07-25 16:33:35 -0500

The migration guide does a fairly good job of documenting the migration process from rosbuild to catkin. There's even a dynamic_reconfigure migration section.

For more details about how to use catkin and cmake, see the catkin common tasks guide


Your missing header is the generated dynamic_reconfigure header. You probably need to add an explicit dependency between your executable and the header generation, so that they get run in the appropriate order, as described in the dynamic_reconfigure migration:

add_dependencies(example_node ${${PROJECT_NAME}_EXPORTED_TARGETS})
edit flag offensive delete link more


Hi! Thank you! When following the guide you sent me, I had to add in CMakeLists.txt the following line: find_package(catkin REQUIRED COMPONENTS roscpp dynamic_reconfigure driver_base pcl_ros pcl) I have now this error: Could not find a configuration file for package pcl. What should I do?

anamcarvalho gravatar image anamcarvalho  ( 2014-07-24 17:02:30 -0500 )edit

PCL changed quite a bit between Groovy and Hydro; the Hydro migration page describes most of the changes you'll need to make: . You didn't mention changing distributions in your question, so I didn't think it was relevant.

ahendrix gravatar image ahendrix  ( 2014-07-24 17:38:43 -0500 )edit

Question Tools



Asked: 2014-07-24 16:13:21 -0500

Seen: 563 times

Last updated: Jul 25 '14