udacity / CarND-Capstone

MIT License
189 stars 1.54k forks source link

VM catkin_make error: "Could not find a package configuration file provided by "pcl_ros"" #125

Closed patrickmpoon closed 3 years ago

patrickmpoon commented 6 years ago

Followed instructions in README to run catkin_make from a base clone of this repo, and encountered the following error:

student@udacity:~/CarND-Capstone$ cd ros
student@udacity:~/CarND-Capstone/ros$ catkin_make
Base path: /home/student/CarND-Capstone/ros
Source space: /home/student/CarND-Capstone/ros/src
Build space: /home/student/CarND-Capstone/ros/build
Devel space: /home/student/CarND-Capstone/ros/devel
Install space: /home/student/CarND-Capstone/ros/install
####
#### Running command: "cmake /home/student/CarND-Capstone/ros/src -DCATKIN_DEVEL_PREFIX=/home/student/CarND-Capstone/ros/devel -DCMAKE_INSTALL_PREFIX=/home/student/CarND-Capstone/ros/install -G Unix Makefiles" in "/home/student/CarND-Capstone/ros/build"
####
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.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
-- Detecting C compile features
-- Detecting C compile features - 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
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CATKIN_DEVEL_PREFIX: /home/student/CarND-Capstone/ros/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/kinetic
-- This workspace overlays: /opt/ros/kinetic
-- Found PythonInterp: /usr/bin/python (found version "2.7.12") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/student/CarND-Capstone/ros/build/test_results
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/local/bin/nosetests-2.7
-- catkin 0.7.6
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 8 packages in topological order:
-- ~~  - camera_info_publisher
-- ~~  - styx
-- ~~  - styx_msgs
-- ~~  - twist_controller
-- ~~  - waypoint_follower
-- ~~  - waypoint_loader
-- ~~  - waypoint_updater
-- ~~  - tl_detector
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'camera_info_publisher'
-- ==> add_subdirectory(camera_info_publisher)
-- +++ processing catkin package: 'styx'
-- ==> add_subdirectory(styx)
-- +++ processing catkin package: 'styx_msgs'
-- ==> add_subdirectory(styx_msgs)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- styx_msgs: 4 messages, 0 services
-- +++ processing catkin package: 'twist_controller'
-- ==> add_subdirectory(twist_controller)
-- +++ processing catkin package: 'waypoint_follower'
-- ==> add_subdirectory(waypoint_follower)
CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
  Could not find a package configuration file provided by "pcl_ros" with any
  of the following names:

    pcl_rosConfig.cmake
    pcl_ros-config.cmake

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

-- Could not find the required component 'pcl_ros'. 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 "pcl_ros" with any
  of the following names:

    pcl_rosConfig.cmake
    pcl_ros-config.cmake

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

-- Configuring incomplete, errors occurred!
See also "/home/student/CarND-Capstone/ros/build/CMakeFiles/CMakeOutput.log".
See also "/home/student/CarND-Capstone/ros/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

Resolution: Ran sudo apt install ros-kinetic-pcl-ros which resolved this dependency issue.

chriswernst commented 6 years ago

+1 in the RoboND... the solution sudo apt install ros-kinetic-pcl-ros worked for me also!

UAnjali commented 3 years ago

Hi @patrickmpoon, Though we are a little late to respond, we encourage such user-specific issues to be raised on the Knowledge hub, so that our experienced mentors can chime in and new students can also learn from the discussion thread. You can also visit this thread for more information: https://knowledge.udacity.com/questions/33484 Thank you