0
$\begingroup$

I installed ros-melodic-navigation with:

$ sudo apt-get install ros-melodic-navigation
[sudo] password for user: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ros-melodic-navigation is already the newest version (1.16.6-1bionic.20200530.114248).
The following packages were automatically installed and are no longer required:
  linux-headers-5.3.0-51 linux-headers-5.3.0-51-generic
  linux-image-5.3.0-51-generic linux-modules-5.3.0-51-generic
  linux-modules-extra-5.3.0-51-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 300 not upgraded.

I can find the navigation package with:

$ apt list | grep navigation
...
ros-melodic-navigation/bionic,now 1.16.6-1bionic.20200530.114248 amd64 [installed]
...

But when I try it with rospack, I get an error

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

What is the issue here?

$\endgroup$
4
  • $\begingroup$ Have you tried rospack profile before rospack find? $\endgroup$
    – Franky
    Jun 20, 2020 at 16:43
  • $\begingroup$ I don't know of rospack profile so I haven't tried it. $\endgroup$ Jun 20, 2020 at 17:25
  • $\begingroup$ Please try rospack profile before searching for the package. $\endgroup$
    – Franky
    Jun 21, 2020 at 4:31
  • $\begingroup$ Also for other's future reference you need to make sure to source /opt/ros/melodic/setup.bash before trying to find a package in the workspace. $\endgroup$
    – Tully
    Oct 14, 2021 at 22:16

2 Answers 2

1
$\begingroup$

generally, I think posting ROS related questions would be better on ROS answers

Regarding your question - did you source /opt/ros/melodic/setup.bash ?

You can check the package path by echo $ROS_PACKAGE_PATH , which is the path where rospack will search

$\endgroup$
1
  • $\begingroup$ I found that it took some time to get an answer from there. $\endgroup$ Jul 8, 2020 at 14:28
1
$\begingroup$

Its probably because its a metapackage. they might leave that out of the rospack find. but roscd works even though i get the same error you are getting on a rospack find

$\endgroup$
1
  • 1
    $\begingroup$ Welcome to Robotics Jason Borne. Thanks for your answer but we are looking for comprehensive answers that provide some explanation and context. Very short answers cannot do this, so please edit your answer to explain why it is right, ideally with citations. Answers that don't include explanations may be removed. See How to Answer for more info. $\endgroup$
    – Ben
    Oct 15, 2021 at 13:51

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.