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

roslaunch using tmux for large project [solved]

asked 2018-04-20 12:55:55 -0500

updated 2021-06-16 02:47:20 -0500


I have a project with a launch file that includes other launch files and many nodes. I would like to run it in a tmux session in a specific way with various windows and panes, some nodes running with gdb or valgrind.

For now I'm testing a simple script that would take the window name as a first argument, so something like this in the launch file in a node tag:

launch-prefix="$(find my_package)/script/ window_name"

And with the script (set with chmod +x) :


tmux new-window -n $1 "gdb --args ${*:2}"

So the command should create a new window named as the first argument, and forward everything else to gdb. But the node crashes with "process has died".

Has anybody done something similar, or am I missing something ?


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2019-01-30 14:20:23 -0500

Purplefishies gravatar image


I was looking to do the exact same thing and I found a way to do it with a more recent version of TMUX ( > 1.8 ) using the wait-for command.

I have a script that looks like the following


tmux new-window "gdb -q $GDB_ARGS --args $* ; tmux wait-for -S gdb_ros_done"

tmux wait-for gdb_ros_done

This way your script won't complete until after you are finished debugging your ROS node. This keeps your ROS node from exiting with "process has died". When it finishes, the gdb_ros_done signal is sent, and then the last statement in your script can finally execute.

( The GDB_ARGS was a fix to let me put break points in using the "-ex" command line option to gdb )

edit flag offensive delete link more

answered 2018-04-20 14:42:12 -0500

NEngelhard gravatar image

You could have a look at catmux. I haven't used it, but it sounds like the thing you are looking for.

edit flag offensive delete link more


Thanks, it looks like what I was searching for! It's under development but I'll try it and mark your answer if it works.

Cyril Jourdan gravatar image Cyril Jourdan  ( 2018-04-20 14:51:15 -0500 )edit

Question Tools

1 follower


Asked: 2018-04-20 12:55:55 -0500

Seen: 1,553 times

Last updated: Jun 16 '21