My terminal opens then closes after roslaunch command

asked 2016-08-23 21:10:52 -0600

Piero-31 gravatar image

updated 2016-09-01 22:56:02 -0600


I have a problem when I use the roslaunch command to launch several executables. When I roslaunch my package, it should open 3 terminals and make the different command lines that I have put in 3 different scripts. But for one of these, the terminal opens and then closes immediately. I don't understand, because when I enter the command lines manually to launch this executable, it works.

Here is the script of my executable (its name is :

source catkin_ws/devel/setup.bash
rosrun rqt_mypkg generation

and the script of my launch file (test.launch) about this executable is :

    <node name="gaitnode" pkg="rqt_mypkg" type="" output="screen" launch-prefix="gnome-terminal --command" />

I have made the executable executable and catkin_make my package without problem. I'm on ROS indigo and ubuntu 14.04.

So when I roslaunch it with :

roslaunch rqt_mypkg test.launch

for this executable the terminal opens, there is a message with source : not found, and then it closes. Normally the program should run and the terminal stay open. It works when I enter the commands manually.

Any explanation please ?

Thank you !

edit retag flag offensive close merge delete


You should be able to debug by running your launch file without the launch-prefix portion; that should at least give you a better error message.

ahendrix gravatar image ahendrix  ( 2016-08-24 21:48:44 -0600 )edit

Do you mean that I have to remove : launch-prefix="gnome-terminal --command" ? when I do that it's worst and the roslaunch command doesn't even work.

Piero-31 gravatar image Piero-31  ( 2016-09-01 22:55:20 -0600 )edit

specify "doesn't even work"

dornhege gravatar image dornhege  ( 2016-09-02 05:57:55 -0600 )edit