Robotics StackExchange | Archived questions

Roslaunch not able to detect launch file packages

I have a navigation stack for odometry, lidar and camera data integration. But roslaunch is not able to run the launch files from the navigation stack package from terminal input. Can anybody suggest solutions?

We have a package called testnav that contains a launch file called testconfiguration.launch within the /src directory. roslaunch testnav testconfiguration.launch

THe above command continues to give errors saying testnav package does not exist. In fact, testnav isn't even compiling during catkin_make. Please suggest solutions

Asked by arvind on 2014-08-23 00:02:17 UTC

Comments

Have you sourced the setup.bash file under the devel folder of your workspace (after the build)? You can do that as follows (from inside your workspace): source devel/setup.bash.

Asked by nbro on 2019-03-01 10:49:52 UTC

Answers

Does your test_nav package have a package.xml and a CMakeLists.txt ?

Asked by ahendrix on 2014-08-23 01:16:31 UTC

Comments

The folder actually contains a CMakeLists.txt and a manifest.xml. I understand that manifest.xml is generally for rosbuild variants... but I am working with catkin. Also, I forgot to mention that I am working with ROS Hydro.

Asked by arvind on 2014-08-23 02:10:46 UTC

Your package needs to contain a package.xml in order for catkin to recognize it as a package.

Asked by ahendrix on 2014-08-23 02:37:11 UTC

Yes I kinda figured that.. but manually writing and replacing the manifest.xml with a package.xml does not seem to help! Can u suggest any other method?

Asked by arvind on 2014-08-23 03:48:08 UTC

The way your package was set up is likely incorrect for use with a catkin workspace. Try the following:

  1. Make sure your catkin workspace is configured properly, and that you can build and source it
  2. Ensure you can build other packages from your catkin workspace and can run nodes of those packages
  3. Assuming your test_nav is a package, not a metapackage, configure CMakeLists.txt and package.xml (see details)
  4. I would advise you create a folder called launch/ inside test_nav and move the launch files there (just to keep your package tidy)

The first two steps are to ensure the problem is not with your workspace. The third step is to ensure your package is catkin-compliant.

In the worst case scenario, move the test_nav folder out of your catkin workspace, then create a new package with the same name in your workspace with catkin_create_pkg, configure the CMakeLists.txt and package.xml files, copy the header/source/launch files to their corresponding folders and try to build your workspace again.

Remember to source your workspace after building it. Sometimes, I need to run rospack profile even after sourcing my workspace so that the newly built nodes get indexed. I don't know why, and never bothered looking into it, as it's a minor issue to me and happens very rarely.

I hope it helps.

Asked by Murilo F. M. on 2014-08-23 10:16:21 UTC

Comments

Thanks a lot! Your answer was very helpful!

Asked by arvind on 2014-08-23 14:06:44 UTC