already install package[nav_msgs] with command[sudo apt install ros-melodic-nav-msgs] ,but catkin_make still will output error cant find nav_msg

asked 2021-05-17 03:03:23 -0500

resplendent star gravatar image

updated 2021-05-17 18:09:46 -0500

jayess gravatar image

already install package[nav_msgs] with command[sudo apt install ros-melodic-nav-msgs] ,but catkin_make still will output error cant find nav_msg

CMake Error at /home/lzw/anaconda3/envs/s_re/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "nav_msgs" with any
  of the following names:

    nav_msgsConfig.cmake
    nav_msgs-config.cmake

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


-- Configuring incomplete, errors occurred!
See also "/home/lzw/nd/sem2/AD/project/code/LOAM_WS/build/CMakeFiles/CMakeOutput.log".
See also "/home/lzw/nd/sem2/AD/project/code/LOAM_WS/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed
edit retag flag offensive close merge delete

Comments

1

Can you find some floder name like "nav_msgs" in devel/share of your catkin workspace? If you have ever clone some offical source code in your workspace and make them, the issue may have a strong relative with this.

Heho gravatar image Heho  ( 2021-05-17 07:27:07 -0500 )edit
1

Please check if

$ rospack find nav_msgs

works for you. If not, you can type

$ rospack profile

and try first command again

abrzozowski gravatar image abrzozowski  ( 2021-05-18 00:58:39 -0500 )edit

hi ,i find it is the conda 's problem, i forget i use conda to create a env called [ros_env],but run catkin_make in another env (we could call it B env) created by conda ; in B env :

rospack find nav_msgs [rospack] Error: package 'nav_msgs' not found

in ros_env:

rospack find nav_msgs /opt/ros/melodic/share/nav_msgs

resplendent star gravatar image resplendent star  ( 2021-05-20 02:52:28 -0500 )edit