ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

How to install the diagnostic_msgs config file?

asked 2018-01-10 23:03:13 -0600

Hunter gravatar image

updated 2018-01-11 01:09:24 -0600

mgruhler gravatar image

I tried to use my raspi3 to control the roomba641. I followed the guide in 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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-01-11 01:11:16 -0600

mgruhler gravatar image

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.

edit flag offensive delete link more


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?

Hunter gravatar image Hunter  ( 2018-01-11 03:44:01 -0600 )edit

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.

Hunter gravatar image Hunter  ( 2018-01-11 03:46:25 -0600 )edit

Does it work with ros-diagnostic-msgs then? This is strange. Please provide some details on OS and how you set up ROS.

mgruhler gravatar image mgruhler  ( 2018-01-11 04:45:51 -0600 )edit

Basically, I followed this guide 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.

Hunter gravatar image Hunter  ( 2018-01-15 00:36:37 -0600 )edit

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?

Hunter gravatar image Hunter  ( 2018-01-15 00:40:10 -0600 )edit

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,

mgruhler gravatar image mgruhler  ( 2018-01-15 00:53:30 -0600 )edit

Thank you. Finally, I changed to ubuntu mate with ros kinetic, and It works with no error.

Hunter gravatar image Hunter  ( 2018-01-16 21:58:18 -0600 )edit

Question Tools

1 follower


Asked: 2018-01-10 23:03:13 -0600

Seen: 1,570 times

Last updated: Jan 11 '18