qboticslabs / mastering_ros

This repository contains exercise files of the book "Mastering ROS for Robotics Programming"
https://www.packtpub.com/hardware-and-creative/mastering-ros-robotics-programming
468 stars 282 forks source link

[Chapter 3] Cannot find the 'mastering_ros_robot_description_pkg' library while 'catkin_make' the workspace #13

Closed DanielCGuo closed 7 years ago

DanielCGuo commented 7 years ago

**### Test Environment: Ubuntu 14.04 with Indigo

Error msg is shown below:


root@daniel-VirtualBox:~/catkin_ws# catkin_make Base path: /home/daniel/catkin_ws Source space: /home/daniel/catkin_ws/src Build space: /home/daniel/catkin_ws/build Devel space: /home/daniel/catkin_ws/devel Install space: /home/daniel/catkin_ws/install

Running command: "make cmake_check_build_system" in "/home/daniel/catkin_ws/build"

-- Using CATKIN_DEVEL_PREFIX: /home/daniel/catkin_ws/devel -- Using CMAKE_PREFIX_PATH: /home/daniel/catkin_ws/devel;/opt/ros/indigo -- This workspace overlays: /home/daniel/catkin_ws/devel;/opt/ros/indigo -- 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/daniel/catkin_ws/build/test_results -- Found gtest sources under '/usr/src/gtest': gtests will be built -- Using Python nosetests: /usr/bin/nosetests-2.7 -- catkin 0.6.18 -- BUILD_SHARED_LIBS is on -- ~~~~~~~~~~~~~ -- ~~ traversing 4 packages in topological order: -- ~~ - beginner_tutoriials -- ~~ - mastering_ros_demo_pkg -- ~~ - mastering_ros_robot_description_pkg -- ~~ - seven_dof_arm_gazebo -- ~~~~~~~~~~~~~ -- +++ processing catkin package: 'beginner_tutoriials' -- ==> add_subdirectory(beginner_tutoriials) -- Using these message generators: gencpp;genlisp;genpy -- beginner_tutoriials: 1 messages, 1 services -- +++ processing catkin package: 'mastering_ros_demo_pkg' -- ==> add_subdirectory(mastering_ros_demo_pkg) -- Using these message generators: gencpp;genlisp;genpy -- Boost version: 1.54.0 -- Found the following Boost libraries: -- system -- Generating .msg files for action mastering_ros_demo_pkg/Demo_action /home/daniel/catkin_ws/src/mastering_ros_demo_pkg/action/Demo_action.action -- mastering_ros_demo_pkg: 8 messages, 1 services -- +++ processing catkin package: 'mastering_ros_robot_description_pkg' -- ==> add_subdirectory(mastering_ros_robot_description_pkg) -- Using these message generators: gencpp;genlisp;genpy -- +++ processing catkin package: 'seven_dof_arm_gazebo' -- ==> add_subdirectory(seven_dof_armgazebo) -- Using these message generators: gencpp;genlisp;genpy CMake Error at /home/daniel/catkin_ws/devel/share/mastering_ros_robot_description_pkg/cmake/mastering_ros_robot_description_pkgConfig.cmake:141 (message): Project 'seven_dof_arm_gazebo' tried to find library 'mastering_ros_robot_description_pkg'. The library is neither a target nor built/installed properly. Did you compile project 'mastering_ros_robot_description_pkg'? Did you find_package() it before the subdirectory containing its code is included? Call Stack (most recent call first): /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:76 (find_package) seven_dof_arm_gazebo/CMakeLists.txt:7 (find_package)_


AND the CMakelists.txt is as below:

cmake_minimum_required(VERSION 2.8.3) project(seven_dof_armgazebo) ... find_package(catkin REQUIRED COMPONENTS <----line 7_ gazebo_msgs gazebo_plugins gazebo_ros gazebo_ros_control mastering_ros_robot_description_pkg )

...

qboticslabs commented 7 years ago

Can you copy the package mastering_ros_robot_description_pkg to the workspace ..??

The error is because, it is not finding this package !!

DanielCGuo commented 7 years ago

@qboticslabs but it is in the same workspace, and I already built and tried it with RViz. You can see this in the build output msg.

qboticslabs commented 7 years ago

Just remove mastering_ros_robot_description_pkg from CMakeList.txt, if it is already there .. just try this work or not !!

DanielCGuo commented 7 years ago

@qboticslabs Yes, it works! But, why ? intresting...