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

catkin package build error

asked 2014-01-21 04:42:56 -0500

bvbdort gravatar image

updated 2014-01-21 08:00:23 -0500

Hi,

I am trying to build slam_gmapping in catkin workspace. I had cloned and build openslam_gmapping package but i am getting below error. I was able to find openslam_gmapping from rospack find openslam_gmapping. I am using ros groovy

    -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 2 packages in topological order:
-- ~~  - gmapping
-- ~~  - slam_gmapping (metapackage)
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'gmapping'
-- ==> add_subdirectory(slam_gmapping/gmapping)
CMake Error at /opt/ros/groovy/share/catkin/cmake/catkinConfig.cmake:72 (find_package):
  Could not find a configuration file for package openslam_gmapping.

  Set openslam_gmapping_DIR to the directory containing a CMake configuration
  file for openslam_gmapping.  The file will have one of the following names:

    openslam_gmappingConfig.cmake
    openslam_gmapping-config.cmake

Call Stack (most recent call first):
  slam_gmapping/gmapping/CMakeLists.txt:4 (find_package)


-- +++ processing catkin metapackage: 'slam_gmapping'
-- ==> add_subdirectory(slam_gmapping/slam_gmapping)
-- Configuring incomplete, errors occurred!
Invoking "cmake" failed

Edit

Operating System - Ubuntu 12.04

openslam_gmapping cloned from https://github.com/ros-perception/openslam_gmapping

I tried apt-get install ros-groovy-openslam-gmapping but not working.

thanks.

edit retag flag offensive close merge delete

Comments

1

Could You please, be more specific on details like: 1. Operating System. 2. Where did You installed it (openslam_gmapping) from sources? (it smells like an issue with not following the Catkin Workspace directory structure). 3. Did you source the setup.bash file which was created in the place you installed it to before trying to compile with it? 4. If it's Ubuntu, have You considered simply `apt-get install ros-groovy-openslam-gmapping`?

Kamiccolo gravatar image Kamiccolo  ( 2014-01-21 06:13:13 -0500 )edit

@Kamiccolo i updated the question for 1,2,4 question. I didnt source setup.bash

bvbdort gravatar image bvbdort  ( 2014-01-21 08:02:36 -0500 )edit
1

Do you have your catkin workspace initialized properly (see 'http://wiki.ros.org/catkin/Tutorials/create_a_workspace'). Plz source setup.bash in your catkin_ws/devel folder. If you create a simple package and than a second package that depends on your first package, do they find each other?

Wolf gravatar image Wolf  ( 2014-01-21 19:29:19 -0500 )edit

@Wolf After doing source devel/setup.bash build is proper.

bvbdort gravatar image bvbdort  ( 2014-01-21 21:30:27 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
0

answered 2014-01-21 21:55:30 -0500

Wolf gravatar image

Do you have your catkin workspace initialized properly (see 'http://wiki.ros.org/catkin/Tutorials/create_a_workspace'). Plz source setup.bash in your catkin_ws/devel folder.

You can check your workspace being properly initialized by creating two simple packages in your workspace where one package depends on the other. If they find each other the workspace is Ok.

edit flag offensive delete link more
1

answered 2021-05-04 21:53:41 -0500

Kothandaraman Kannadasan gravatar image

Hi @bvbdort, If you want to install the source code of gmapping in your workspace. you just need to do the following steps,

Download the source code from the following link via zip file and unzip the file https://github.com/ros-perception/slam_gmapping/tree/groovy-devel .

Then, copy-paste the source code of gmapping into your workspace.

Before building the workspace you should run the following command, sudo apt-get install ros-groovy-openslam-gmapping It helps to install the following files for gmapping.

openslam_gmappingConfig.cmake
openslam_gmapping-config.cmake

If you have any queries please leave your problem here.

edit flag offensive delete link more
1

answered 2018-10-16 20:35:33 -0500

malgudi gravatar image

Hi!! Since you have cloned the repository from github, so you have that package. Follow the following steps, you can build package without error,

  1. catkin_create_pkg <pkg_name> roscpp
  2. Go to src folder in that package
  3. Paste the packages you downloaded from github.
  4. now, catkin_make --pkg <pkg_name>

Let me know if it does not work.

Thank You.

edit flag offensive delete link more

Comments

2

Hi @mallikarjun: +1 for making the effort to post here, but what you suggest is not necessary, nor the recommended way to do it.

If you download the pkg from github, you can immediately build them (provided you have installed the dependencies). No need to run catkin_create_pkg first.

gvdhoorn gravatar image gvdhoorn  ( 2018-10-17 02:12:26 -0500 )edit
1

Further: you should be very hesitant to build packages from sources. Using apt to install them is almost always preferable.

gvdhoorn gravatar image gvdhoorn  ( 2018-10-17 02:13:04 -0500 )edit

Worked like a charm! Thanks!

yashmaurya gravatar image yashmaurya  ( 2019-12-23 23:13:51 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-01-21 04:42:56 -0500

Seen: 6,141 times

Last updated: May 04 '21