Robotics StackExchange | Archived questions

Catkin_make error related to pocketsphinx

I am working through Map-based Navigation on this website https://edu.gaitech.hk/turtlebot/map-navigation.html, and I am running into issues when I am installing the package.

I cloned the package from this git hub repository https://github.com/aniskoubaa/gaitech_edu.

I am using ROS Kinetic & Ubuntu16.04 LTS

Note: I asked a similar question in this post https://answers.ros.org/question/351067/cmake-error-when-installing-beginner_tutorialspackage/, but it was not related to to the ROS beginner tutorials package at the time so I deleted the gaitech_edu package.

I am running the following commands and the error occurs when I run catkin_make.

cd ~/catkin_ws/src/
git clone https://github.com/aniskoubaa/gaitech_edu.git
cd ~/catkin_ws && catkin_make

This is the error, it is related to pocketsphinx package.

    jamescoady@jamescoady-Inspiron-5579:~/catkin_ws/src$ cd ~/catkin_ws && catkin_make

    Base path: /home/jamescoady/catkin_ws

   Source space: /home/jamescoady/catkin_ws/src

    Build space: /home/jamescoady/catkin_ws/build

    Devel space: /home/jamescoady/catkin_ws/devel

    Install space: /home/jamescoady/catkin_ws/install

    ####

  #### Running command: "cmake /home/jamescoady/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/jamescoady/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/jamescoady/catkin_ws/install -G Unix Makefiles" in "/home/jamescoady/catkin_ws/build"

####

    -- Using CATKIN_DEVEL_PREFIX: /home/jamescoady/catkin_ws/devel

    -- Using CMAKE_PREFIX_PATH: /home/jamescoady/catkin_ws/devel;/opt/ros/kinetic

    -- This workspace overlays: /home/jamescoady/catkin_ws/devel;/opt/ros/kinetic

    -- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.12", minimum required is "2") 

    -- Using PYTHON_EXECUTABLE: /usr/bin/python2

    -- Using Debian Python package layout

    -- Using empy: /usr/bin/empy

    -- Using CATKIN_ENABLE_TESTING: ON

    -- Call enable_testing()

    -- Using CATKIN_TEST_RESULTS_DIR: /home/jamescoady/catkin_ws/build/test_results

    -- Found gtest sources under '/usr/src/gmock': gtests will be built

    -- Found gmock sources under '/usr/src/gmock': gmock will be built

    -- Found PythonInterp: /usr/bin/python2 (found version "2.7.12") 

    -- Using Python nosetests: /usr/bin/nosetests-2.7

    -- catkin 0.7.20

    -- BUILD_SHARED_LIBS is on

    -- BUILD_SHARED_LIBS is on

    -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    -- ~~  traversing 2 packages in topological order:

    -- ~~  - beginner_tutorials

    -- ~~  - gaitech_edu

    -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    -- +++ processing catkin package: 'beginner_tutorials'

    -- ==> add_subdirectory(beginner_tutorials)

    -- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy

    -- beginner_tutorials: 1 messages, 1 services

    -- +++ processing catkin package: 'gaitech_edu'

    -- ==> add_subdirectory(gaitech_edu)

    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/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/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".

    Invoking "cmake" failed

I have installed pocketsphinx with no issues using the commands below, but I still get the same error when running catkin make

sudo apt update

sudo apt install pocketsphinx

This is the output of ls -al ~/catkin_ws/src

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

drwxrwxr-x 4 jamescoady jamescoady 4096 May  8 12:52 .

drwxrwxr-x 6 jamescoady jamescoady 4096 May  8 12:45 ..

drwxrwxr-x 6 jamescoady jamescoady 4096 May  8 11:25 beginner_tutorials

lrwxrwxrwx 1 jamescoady jamescoady   50 Nov  1  2019 CMakeLists.txt -> /opt/ros/kinetic/share/catkin/cmake

/toplevel.cmake

drwxrwxr-x 4 jamescoady jamescoady 4096 May  8 12:52 gaitech_edu

Has anyone come accross this issue? Am I installing pocketsphinx incorrectly?

I also tried these commands to ensure pocketsphinx was installed, I found this on this website https://zoomadmin.com/HowToInstall/UbuntuPackage/python-pocketsphinx.

sudo apt-get update -y

sudo apt-get install -y python-pocketsphinx

Asked by jimc91 on 2020-05-08 07:54:34 UTC

Comments

Answers

Only git clone-ing a repository is almost never enough.

Refer to #q252478 for an example workflow when building packages from source.

I would be surprised if the Gaitech page you link doesn't include similar instructions though. You cannot just build a workspace with some packages you've git clone-ed.

Asked by gvdhoorn on 2020-05-08 09:00:17 UTC

Comments

i referred your steps http://answers.ros.org/question/252478/

it didn't work out well

I got the following build error

ERROR: the following packages/stacks could not have their rosdep keys resolved to system dependencies: gaitech_edu: Cannot locate rosdep definition for [pocketsphinx]

Asked by Nitesh_j on 2020-05-08 23:20:04 UTC

That's a problem with the gaitech_edu package. Not with the procedure described in #q252478.

Asked by gvdhoorn on 2020-05-09 03:34:57 UTC