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

Package cannot find nav_msgs even though its listed as a dependency? [closed]

asked 2014-07-15 15:59:05 -0500

mysteriousmonkey29 gravatar image

updated 2015-08-18 01:32:21 -0500

ahendrix gravatar image

Hello, I am trying to run a ROS node for the ax2550 motor controller, found here:

However, when I try to compile with catkin_make, I get the following error:

CMake Error at /opt/ros/hydro/share/genmsg/cmake/genmsg-extras.cmake:255 (message): Messages depends on unknown pkg: nav_msgs (Missing find_package(nav_msgs?)) Call Stack (most recent call first): ax2550/CMakeLists.txt:22 (generate_messages)

Everything I can find about this error online simply indicates that I need to specify nav_msgs as a dependency to my package, but it's already there:

<build_depend>nav_msgs</build_depend> <run_depend>nav_msgs</run_depend>

Any ideas as to what could br going wrong?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by mysteriousmonkey29
close date 2014-07-16 12:39:56.161706


Make sure that nav_msgs is installed, the following command should show the path to nav_msgs: rospack find nav_msgs

Martin Peris gravatar image Martin Peris  ( 2014-07-16 00:25:20 -0500 )edit

It is installed, and entering that command returns the correct path: /opt/ros/hydro/share/nav_msgs. Although maybe its possible that the node isn't looking for nav_msgs there--I don't know hot tell from the code or the error.

mysteriousmonkey29 gravatar image mysteriousmonkey29  ( 2014-07-16 11:15:31 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-07-15 18:41:47 -0500

DevonW gravatar image

sudo apt-get install ros-hydro-common-msgs

edit flag offensive delete link more


Tried that but it said it installed nothing new. Nav_msgs is already installed.

mysteriousmonkey29 gravatar image mysteriousmonkey29  ( 2014-07-16 11:13:36 -0500 )edit

This sounds like its an environment issue. Could you install ros-hydro-common-msgs from source and try recompiling? (with the ax550 and the nav_msgs in the same src directory). As well, please sudo rm -rf devel build inside your catkin_ws.

DevonW gravatar image DevonW  ( 2014-07-16 11:31:28 -0500 )edit

Reinstalling it from source in the same src directory did the trick. For anyone else with this problem, git clone And then catkin_make again. Thanks!

mysteriousmonkey29 gravatar image mysteriousmonkey29  ( 2014-07-16 12:37:57 -0500 )edit

It might have been only a matter of rebuilding the catking_ws. I would try to remove the source code for common_msgs that you just installed and rm -rf devel build inside your catking_ws, then catkin_make again and see what happens.

Martin Peris gravatar image Martin Peris  ( 2014-07-16 19:32:47 -0500 )edit

Tried that, but got the same error again; "messages depends on unknown package: nav_msgs"

mysteriousmonkey29 gravatar image mysteriousmonkey29  ( 2014-07-18 11:11:07 -0500 )edit

O_O Thanks for trying and posting back the result

Martin Peris gravatar image Martin Peris  ( 2014-07-19 06:14:59 -0500 )edit

Question Tools

1 follower


Asked: 2014-07-15 15:59:05 -0500

Seen: 2,799 times

Last updated: Jul 15 '14