ROS Launcher File Results in Error with roslaunch

asked 2020-08-31 12:44:19 -0500

Joesan gravatar image

I have a ROS project that I'm trying out. I have the following folder structure:

  - src
    - beginner_tutorials
      - src
        - listener.cpp
        - talker.cpp
      - config
        - config.conf
      - launch
        - my.launch
      - srv
        - ModifyText.srv
      - CMakeLists.txt

Assume that I have the remaining folders in the catkin_ws like the devel etc.,

Now when I tried to launch the listenere and talker using the launcher file as below, I get the error as below:

joesan@joesan-InfinityBook-S-14-v5:~/Projects/ros-projects/catkin_ws$ roslaunch beginner_tutorials my.launch
... logging to /home/joesan/.ros/log/4df614ca-ebaa-11ea-b08a-3fbc143c4e1a/roslaunch-joesan-InfinityBook-S-14-v5-7071.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://joesan-InfinityBook-S-14-v5:37169/


 * /rosdistro: noetic
 * /rosversion: 1.15.8

    listener (beginner_tutorials/listener)
    talker (beginner_tutorials/talker)


process[talker-1]: started with pid [7085]
RLException: Roslaunch got a 'No such file or directory' error while attempting to run:

gnome-terminal -e /home/joesan/Projects/ros-projects/catkin_ws/devel/lib/beginner_tutorials/listener __name:=listener __log:=/home/joesan/.ros/log/4df614ca-ebaa-11ea-b08a-3fbc143c4e1a/listener-2.log

Please make sure that all the executables in this command exist and have
executable permission. This is often caused by a bad launch-prefix.
The traceback for the exception was written to the log file
[ INFO] [1598893286.274250713]: hello world 0
[talker-1] killing on exit
[listener-2] killing on exit

Here are the contents of my launch file my.launch:

         value="$(find beginner_tutorials)/config/config.conf"/>
    <arg name = "frequency" default = "10" />
    <node pkg = "beginner_tutorials"
          type = "talker"
          name = "talker"
          output = "screen"
          args="$(arg frequency)"/>

    <node pkg = "beginner_tutorials"
          type = "listener"
          name = "listener"
          output = "screen"
          launch-prefix = "gnome-terminal -e"/>

I can see that inside the devel folders, the binaries are located as below:

joesan@joesan-InfinityBook-S-14-v5:~/Projects/ros-projects/catkin_ws/devel/lib$ cd beginner_tutorials/
drwxrwxr-x joesan joesan     4 KB Mon Aug 31 18:44:39 2020  .
drwxrwxr-x joesan joesan     4 KB Mon Aug 31 18:44:37 2020  ..
.rwxrwxr-x joesan joesan 327.3 KB Mon Aug 31 18:44:39 2020  listener
.rwxrwxr-x joesan joesan 190.1 KB Mon Aug 31 18:44:39 2020  talker
edit retag flag offensive close merge delete


Did you execute source ~/Projects/ros-projects/catkin_ws/devel/setup.bash before running launch file?

dtyugin gravatar image dtyugin  ( 2020-08-31 17:57:47 -0500 )edit

Yes! I did that! I in fact have that as a dynamic thing in my .bash_profile.

I did manage to fix this by removing the launch-prefix from the my.launch file!

Joesan gravatar image Joesan  ( 2020-08-31 23:22:37 -0500 )edit

And making sure: what is the output of which gnome-terminal?

gvdhoorn gravatar image gvdhoorn  ( 2020-09-01 02:37:50 -0500 )edit