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

ROS2 Launch file error : libexec directory does not exist

asked 2020-11-16 04:09:19 -0500

Remi_ea gravatar image

updated 2020-11-17 03:23:15 -0500

I'm trying to create a simple launch file for one node of my project, I used ROS2 tutorials but the launch file is not working. My project is runing with Eloquent, I used colcon build to install both my executable and my launch file. I tried to run the same launch file on a virtual machine and on a computer, both running on ubuntu 18.04 LTS but I got the same error each time. To run the executable I use its name directly in shell :

$ maintenance_mode

And it works fine. But when I use ros2 run ea_maintenance_mode_manager maintenance_mode it doesn't work, I get no executable found.

Here is the launch file maintenance.launch.py :

from launch import LaunchDescription
from launch_ros.actions import Node

def generate_launch_description():
   return LaunchDescription([
      Node(
            package='ea_maintenance_mode_manager',
            node_namespace='maintenance_mode',
            node_executable='maintenance_mode',
        )
   ])

The launch file is in the same package as the node, in a launch directory, and I added the launch's line in the setup.py file The error returned when I run the ros2 launch is :

$ ros2 launch ea_maintenance_mode_manager maintenance.launch.py 
[INFO] [launch]: All log files can be found below /home/remi/.ros/log/2020-11-16-10-38-57-872089-remi-virtual-machine-4587
[INFO] [launch]: Default logging verbosity is set to INFO
[ERROR] [launch]: Caught exception in launch (see debug for traceback): package 'ea_maintenance_mode_manager' found at '/home/remi/Desktop/robot-artificial-intelligence/install/ea_maintenance_mode_manager', but libexec directory '/home/remi/Desktop/robot-artificial-intelligence/install/ea_maintenance_mode_manager/lib/ea_maintenance_mode_manager' does not exist

But this folder does exist in my workspace (robot-artificial-intelligence) and the package is in the /src folder of my workspace. Thank you for your time

edit retag flag offensive close merge delete

Comments

Please edit your question to include more information such as how you're installing both your launch files and your executables. We can't help you without enough information to reproduce your problem.

tfoote gravatar image tfoote  ( 2020-11-16 16:39:26 -0500 )edit

I added some information, yet I don't know if it will be enough for you to reproduce my problem.

Remi_ea gravatar image Remi_ea  ( 2020-11-17 03:24:24 -0500 )edit

From what you're writing my guess is that you're installing it into the global executable path and not the package specific path. as I stated you need to share your build and installation rules for us to help you debug your paths.

tfoote gravatar image tfoote  ( 2020-11-17 16:11:46 -0500 )edit

I don't have any installation rule, or may be I don't know that I'm using one because I'm not sure what you mean by that. I just created a workspace by doing a colcon build in an empty folder. Then I added in the /src folder my packages, did an other colcon build, sourced and then tried to run my launch file. I also have a launch file I use for Rviz that is working correctly. All my nodes are working fine but none of the launch files I do myself are working.

Remi_ea gravatar image Remi_ea  ( 2020-11-26 10:54:40 -0500 )edit

Plus when I run ros2 pkg executables ea_maintenance_mode_manager It doesn't display my node, so perhaps I'm missing an installation step of my package and executables. My executable should be installed in bin because it can be invoked directly from the commandline. so it should be on the PATH. But then I don't know why I can't invok it in my launch file.

Remi_ea gravatar image Remi_ea  ( 2020-12-04 09:58:12 -0500 )edit

3 Answers

Sort by » oldest newest most voted
2

answered 2020-12-08 03:30:38 -0500

Remi_ea gravatar image

I found what was my problem : somehow the file setup.cfg was deleted from my packages and that's why the executables could not be found by ros2 run and by the launch files. So I created again the file setup.cfg where it was missing :

[develop]
script-dir=$base/lib/<package-name>
[install]
install-scripts=$base/lib/<package-name>

And then it worked.

edit flag offensive delete link more
0

answered 2023-05-25 06:14:52 -0500

Icon45 gravatar image

Hi there i have a similar issue but no of the proposed solutions worked

edit flag offensive delete link more
0

answered 2022-03-11 09:56:08 -0500

Roberto Z. gravatar image

updated 2022-09-16 04:23:26 -0500

In my particular case I was able to solve this by adding an install(PROGRAMS …) command that was missing on my CMakeLists.txt file.

Like this:

install(
  PROGRAMS
  launch/spawn_entity_client.py
  DESTINATION lib/${PROJECT_NAME}
)

Then build, source and launch again.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2020-11-16 04:09:19 -0500

Seen: 7,242 times

Last updated: Sep 16 '22