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

Roslaunch not able to detect launch file packages

asked 2014-08-23 00:02:17 -0600

arvind gravatar image

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 test_nav that contains a launch file called test_configuration.launch within the /src directory. roslaunch test_nav test_configuration.launch

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

edit retag flag offensive close merge delete

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.

nbro gravatar image nbro  ( 2019-03-01 09:49:52 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-08-23 10:16:21 -0600

Murilo F. M. gravatar image

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.

edit flag offensive delete link more

Comments

Thanks a lot! Your answer was very helpful!

arvind gravatar image arvind  ( 2014-08-23 14:06:44 -0600 )edit
0

answered 2014-08-23 01:16:31 -0600

ahendrix gravatar image

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

edit flag offensive delete link more

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.

arvind gravatar image arvind  ( 2014-08-23 02:10:46 -0600 )edit

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

ahendrix gravatar image ahendrix  ( 2014-08-23 02:37:11 -0600 )edit

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?

arvind gravatar image arvind  ( 2014-08-23 03:48:08 -0600 )edit

Question Tools

Stats

Asked: 2014-08-23 00:02:17 -0600

Seen: 12,746 times

Last updated: Aug 23 '14