Robotics StackExchange | Archived questions

My terminal opens then closes after roslaunch command

Hello,

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 generation.sh) :

source catkin_ws/devel/setup.bash
rosrun rqt_mypkg generation

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

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

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 !

Asked by Piero-31 on 2016-08-23 21:10:52 UTC

Comments

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.

Asked by ahendrix on 2016-08-24 21:48:44 UTC

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.

Asked by Piero-31 on 2016-09-01 22:55:20 UTC

specify "doesn't even work"

Asked by dornhege on 2016-09-02 05:57:55 UTC

Answers