Ask Your Question
0

When I tried to compile my packages not all are compiled [closed]

asked 2019-09-30 09:24:11 -0600

oovidiustr gravatar image

updated 2019-09-30 09:59:29 -0600

Hello!

I want to install the bb8 package from this link: bb8-package-ros.

The steps that i made are:

  1. Clone the git link on the directory ~/git
  2. Execute this command: ln -s ~/git/bb8/ ~/catkin_ws/src/
  3. Go to rhe catkin directory: cd ~/catkin_ws
  4. And compile the folder: catkin_make

At this point, i receive this error:

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

    robot_controllersConfig.cmake
    robot_controllers-config.cmake

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


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

    robot_controllersConfig.cmake
    robot_controllers-config.cmake

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


-- Configuring incomplete, errors occurred!
See also "/home/ovidiu/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/ovidiu/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

After I installed dependency: sudo apt install ros-<distro>-robot-controllers , I receive this error:

[ 97%] Built target turtlebot3_example_generate_messages
/usr/bin/ld: cannot find -lgazebo_ros_utils
collect2: error: ld returned 1 exit status
bb8/bb_8_gazebo/CMakeFiles/gazebo_bb_8_controller.dir/build.make:243: recipe for target '/home/ovidiu/catkin_ws/devel/lib/libgazebo_bb_8_controller.so' failed
make[2]: *** [/home/ovidiu/catkin_ws/devel/lib/libgazebo_bb_8_controller.so] Error 1
CMakeFiles/Makefile2:4777: recipe for target 'bb8/bb_8_gazebo/CMakeFiles/gazebo_bb_8_controller.dir/all' failed
make[1]: *** [bb8/bb_8_gazebo/CMakeFiles/gazebo_bb_8_controller.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed

I think I made all thinks good... But I don`t know why it give me this error.

Have somebody any idea?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by oovidiustr
close date 2019-10-07 03:03:46.208286

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-09-30 09:40:53 -0600

LeoE gravatar image

It is just a missing dependency. Just do:

sudo apt install ros-<distro>-robot-controllers

This should fix it.

edit flag offensive delete link more

Comments

It give my anoother error:

[ 97%] Built target turtlebot3_example_generate_messages
/usr/bin/ld: cannot find -lgazebo_ros_utils
collect2: error: ld returned 1 exit status
bb8/bb_8_gazebo/CMakeFiles/gazebo_bb_8_controller.dir/build.make:243: recipe for target '/home/ovidiu/catkin_ws/devel/lib/libgazebo_bb_8_controller.so' failed
make[2]: *** [/home/ovidiu/catkin_ws/devel/lib/libgazebo_bb_8_controller.so] Error 1
CMakeFiles/Makefile2:4777: recipe for target 'bb8/bb_8_gazebo/CMakeFiles/gazebo_bb_8_controller.dir/all' failed
make[1]: *** [bb8/bb_8_gazebo/CMakeFiles/gazebo_bb_8_controller.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed
oovidiustr gravatar imageoovidiustr ( 2019-09-30 09:42:46 -0600 )edit

This is a completely different problem now. I had a look at the git repos and in my opinion (could be wrong) the problem is in the CMakeLists.txt file of the code on git, since no gazebo_ros_utils is either find package'd nor declared as a library.

What happens if you simply leave it away? Meaning to delete the "Gazebo_ros_utils" keyword from the CMakeLists?

LeoE gravatar imageLeoE ( 2019-09-30 10:07:30 -0600 )edit

You are great man! It works! Thanks a lot!

oovidiustr gravatar imageoovidiustr ( 2019-09-30 10:22:44 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2019-09-30 09:24:11 -0600

Seen: 31 times

Last updated: Sep 30