Ask Your Question
0

Cmake error when installing beginner_tutorials/package

asked 2020-04-30 09:16:55 -0500

jimc91 gravatar image

updated 2020-04-30 13:12:24 -0500

gvdhoorn gravatar image

I am following the below tutorials for ROS and am creating a ROS package but am running into issues. http://wiki.ros.org/ROS/Tutorials/Cre...

I am using Ubuntu 16.04 LTS and kinetic kame.

I have entered the following commands in order:

$ cd ~/catkin_ws/src
$ catkin_create_pkg beginner_tutorials std_msgs rospy roscpp
$ cd ~/catkin_ws
$ catkin_make

I am receiving no errors when creating the catkin package, but when I use the catkin_make command I get a CMake error as below:

CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
  Could not find a package configuration file provided by "pocketsphinx" with
  any of the following names:

    pocketsphinxConfig.cmake
    pocketsphinx-config.cmake

  Add the installation prefix of "pocketsphinx" to CMAKE_PREFIX_PATH or set
  "pocketsphinx_DIR" to a directory containing one of the above files.  If
  "pocketsphinx" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  gaitech_edu-master/CMakeLists.txt:7 (find_package)


-- Could not find the required component 'pocketsphinx'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "pocketsphinx" with
  any of the following names:

    pocketsphinxConfig.cmake
    pocketsphinx-config.cmake

  Add the installation prefix of "pocketsphinx" to CMAKE_PREFIX_PATH or set
  "pocketsphinx_DIR" to a directory containing one of the above files.  If
  "pocketsphinx" provides a separate development package or SDK, be sure it
  has been installed.
Call Stack (most recent call first):
  gaitech_edu-master/CMakeLists.txt:7 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/jamescoady/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/jamescoady/catkin_ws/build/CMakeFiles/CMakeError.log".
Makefile:2628: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed

Has anyone come accross this issue before?

I have installed the pocketsphinx using the follwing commands:

$ sudo apt update
$ sudo apt install pocketsphinx

This installs with no issues but when I use 'catkin make' I get the same error as above.

Update I have also tried to install python pcketsphinx using the below commands. But when I try catkin_make again I still get the same errors as above.

$ sudo apt update -y
$ sudo apt-get install -y python-pocketsphinx
edit retag flag offensive close merge delete

Comments

It's more likely CMake is looking for the (old) pocketsphinx ROS package.

However, if you've just installed ROS, this doesn't make much sense.

Can you please include the output of ls -al ~/catkin_ws/src?

gvdhoorn gravatar image gvdhoorn  ( 2020-05-01 03:25:21 -0500 )edit

Hi gvdhoorn,

Below is the output:

jamescoady@jamescoady-Inspiron-5579:~$ ls -al ~/catkin_ws/src

total 40

drwxrwxr-x 10 jamescoady jamescoady 4096 Apr 30 15:47 .

drwxrwxr-x 5 jamescoady jamescoady 4096 Apr 30 15:52 ..

drwxrwxr-x 4 jamescoady jamescoady 4096 Apr 30 15:52 beginner_tutorials

lrwxrwxrwx 1 jamescoady jamescoady 50 Nov 1 12:36 CMakeLists.txt -> /opt/ros/kinetic/share/catkin/cmake/toplevel.cmake

drwx------ 3 jamescoady jamescoady 4096 Apr 29 10:56 gaitech_edu-master

drwxrwxr-x 12 jamescoady jamescoady 4096 Jan 31 12:41 raspicam_node

drwxrwxr-x 4 jamescoady jamescoady 4096 Dec 18 09:18 ros_tutorials_topic

drwxrwxr-x 10 jamescoady jamescoady 4096 Apr 23 08:55 turtlebot3

drwxrwxr-x 9 jamescoady jamescoady 4096 Jan 30 10:45 turtlebot3_applications

drwxrwxr-x 5 jamescoady jamescoady 4096 Jan 30 10:45 turtlebot3_applications_msgs

drwxrwxr-x 4 jamescoady jamescoady 4096 Apr 23 08:53 turtlebot3_msgs

jimc91 gravatar image jimc91  ( 2020-05-01 03:44:34 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2020-05-01 03:50:20 -0500

gvdhoorn gravatar image

Hi gvdhoorn,

Below is the output:

jamescoady@jamescoady-Inspiron-5579:~$ ls -al ~/catkin_ws/src
total 40
drwxrwxr-x 10 jamescoady jamescoady 4096 Apr 30 15:47 .
drwxrwxr-x  5 jamescoady jamescoady 4096 Apr 30 15:52 ..
drwxrwxr-x  4 jamescoady jamescoady 4096 Apr 30 15:52 beginner_tutorials
lrwxrwxrwx  1 jamescoady jamescoady   50 Nov  1 12:36 CMakeLists.txt -> /opt/ros/kinetic/share/catkin/cmake/toplevel.cmake
drwx------  3 jamescoady jamescoady 4096 Apr 29 10:56 gaitech_edu-master
drwxrwxr-x 12 jamescoady jamescoady 4096 Jan 31 12:41 raspicam_node
drwxrwxr-x  4 jamescoady jamescoady 4096 Dec 18 09:18 ros_tutorials_topic
drwxrwxr-x 10 jamescoady jamescoady 4096 Apr 23 08:55 turtlebot3
drwxrwxr-x  9 jamescoady jamescoady 4096 Jan 30 10:45 turtlebot3_applications
drwxrwxr-x  5 jamescoady jamescoady 4096 Jan 30 10:45 turtlebot3_applications_msgs
drwxrwxr-x  4 jamescoady jamescoady 4096 Apr 23 08:53 turtlebot3_msgs

it seems you have quite a few other packages in your workspace.

Your problems are not with the beginner_tutorials, but with one of those other packages.

I would suggest to:

  • either solve the problem with those other packages
  • create a new workspace and follow the tutorials with that new workspace, or
  • move the packages which are in your current workspace to some temporary location so you only keep the beginner_tutorials package
edit flag offensive delete link more

Comments

This worked.

I made a temporary folder for the following:

Gaitech edu_master

raspicam_node

ros_tutorials_topis

turtlebot3

turtlebot3_msgs

turtlebot3_applications

turtlebot3_applications_msgs

I then ran catkin_make again with no error.

I was not aware of problems with the other packages but I will begin to look into that.

Thanks for your help.

jimc91 gravatar image jimc91  ( 2020-05-01 03:59:11 -0500 )edit
0

answered 2020-04-30 16:40:32 -0500

rosbiggener gravatar image

when you install ros , did you Installing and Configuring Your ROS Environment? I think you should complete your installing http://wiki.ros.org/ROS/Tutorials/Ins...

edit flag offensive delete link more

Comments

Hi rosbighener,

I was sure I had completed this but I went back and started the process again.

I checked my ros environment to ensure all variables were set using the following command:

$ printenv | grep ROS

This is the results of the above command:

jamescoady@jamescoady-Inspiron-5579:~$ printenv | grep ROS

ROS_ROOT=/opt/ros/kinetic/share/ros

ROS_PACKAGE_PATH=/home/jamescoady/catkin_ws/src:/opt/ros/kinetic/share

ROS_MASTER_URI=http:// I`ve hidden this

ROS_PYTHON_VERSION=2

ROS_VERSION=1 ROS_HOSTNAME=I`ve hidden this

ROSLISP_PACKAGE_DIRECTORIES=/home/jamescoady/catkin_ws/devel/share/common-lisp

ROS_DISTRO=kinetic

ROS_ETC_DIR=/opt/ros/kinetic/etc/ros

I also checked my .bashrc to ensure the following command was included, and it is in my .bashrc.

source /opt/ros/kinetic/setup.bash

When I then proceed to create a ROS workspace as per tutorial instructions I get the same error error as stated in original post when using Catkin_make command.

jimc91 gravatar image jimc91  ( 2020-05-01 02:41:23 -0500 )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

1 follower

Stats

Asked: 2020-04-30 09:16:55 -0500

Seen: 76 times

Last updated: May 01