ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Hi
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 tmux.sh that looks like the following
#!/bin/sh
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 tmux.sh 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 tmux.sh 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 )