Rosanswers logo

I tried to use my raspi3 to control the roomba641. I followed the guide in https://github.com/AutonomyLab/create_autonomy to install the create_autonomy in my raspi with raspbian and ros indigo. I made a new catkin workspace, and cloned the package in the src folder. I just followed the step wrote in the github and failed in the "catkin build" step. It seems that all the packages except ca_driver successfully built. It said:

"CMake Error at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "diagnostic_msgs"
  with any of the following names:


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

It seems that the problem is lack of diagnostic_msgs. Then, I sudo apt-get install ros-diagnostic_msgs. Again, the same error. What should I do?

Originally posted by Hunter on ROS Answers with karma: 15 on 2018-01-11

Post score: 1


1 Answer 1


Rosanswers logo

This is a typical Problem if you have missing dependencies.

Installing ros-diagnostic_msgs should have thrown an error. There is no such packet. You need to install ros-<distro>-diagnostic-msgs (note the dashes instead of underscores, and the distro, for you this should be ros-indigo-diagnostic-msgs.

If the package you want to compile is set up correctly, you could also do a rosdep install <my_package> to automatically install the required packages.

Originally posted by mgruhler with karma: 12390 on 2018-01-11

This answer was ACCEPTED on the original site

Post score: 0

Original comments

Comment by Hunter on 2018-01-11:
When I do sudo apt-get install ros-indigo-diagnostic-msgs, it said: Reading package lists... Done Building dependency tree
Reading state information... Done E: Unable to locate package ros-indigo-diagnostic-msgs

But it is successful if I run ros-diagnostic-msgs. Which one is correct?

Comment by Hunter on 2018-01-11:
It seems that because I run this command(sudo apt-get install ros-indigo-diagnostic-msgs) on a raspi instead of PC. I also tried this command on my PC, it works.

Comment by mgruhler on 2018-01-11:
Does it work with ros-diagnostic-msgs then? This is strange. Please provide some details on OS and how you set up ROS.

Comment by Hunter on 2018-01-15:
Basically, I followed this guide http://wiki.ros.org/ROSberryPi/Installing%20ROS%20Indigo%20on%20Raspberry%20Pi to build ros indigo on my raspbian. However, I am a beginner, I may pass some steps in 3.2 about dependencies. However, finally, the ros indigo was successfully installed on my raspi.

Comment by Hunter on 2018-01-15:
After I installed ros-diagnostic-msgs, it still can not work. I cloned this in the new catkin build workspace(followed the provided github link). Is the problem related to the workspace?

Comment by mgruhler on 2018-01-15:
after you clone, you obviously need compile as well. Did you do that and was this successfull? Otherwise, you can try to resolve the depenency with rosdep (see 3.2.2).

Another possibility is to use the Ubuntu Mate Image for the raspberry, which works like a charm,

Comment by Hunter on 2018-01-16:
Thank you. Finally, I changed to ubuntu mate with ros kinetic, and It works with no error.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.