Ask Your Question
0

Run nodes in tabs of a terminal by roslaunch (e.g. roxterm)

asked 2017-11-28 03:49:25 -0600

Nicolas gravatar image

Hi,

we would like to run the processes started by roslaunch in individual tabs of an X-terminal. It's a bit against the concepts of rosout, but this allows to quickly switch between the output of nodes and also allows to interact with them during development.

Some X terminals allow to create a new tab from the shell, using e.g. roxterm --tab. This can be used as a launch prefix. However, roxterm --tab does not wait for the launched process to finish. As a result, roslaunch can no longer control it's child processes, and thinks the node exited directly.

I am thinking about a wrapper for roxterm --tab that behaves as expected by roslaunch. The wrapper must: - Wait for the ROS node ran within the tab and return its exit code - Forward signals to the ROS node - Not register as a ROS node in any way

Is this enough, or is there anything else?

Best Regards!

edit retag flag offensive close merge delete

Comments

can we open mutilple tabs of ros prompts in single terminal window and without maximizing it in small size?

noor gravatar imagenoor ( 2019-12-18 00:54:57 -0600 )edit

You can do this by using the shortcut on the terminal: CTRL + SHIFT + T , if you're asking this by saying 'ros prompt'

ermanas gravatar imageermanas ( 2019-12-18 02:25:38 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-11-28 08:08:37 -0600

I had a similar problem, and my solution was to create a bash file, where I created different tabs and launch nodes or launch files in each one of them. I used gnome-terminal and had to add some sleeps in order to wait for the simulator to start running, but maybe you can also use them in the launch prefix. Here are the contents of the bash file.

   echo "Launching: roscore"
   gnome-terminal --window --maximize -x sh -c "roscore; exit"
   sleep 2
   rosparam set /prediction_time 10.0
   echo "Launching: stage_and_maps.launch"
   gnome-terminal --window --maximize -x sh -c "roslaunch stage_and_maps.launch; exit"
   echo "Waiting 10s left"
   sleep 10
   echo "Launching: prediction.launch"
   gnome-terminal --tab --maximize -x sh -c "roslaunch prediction.launch; exit"

Hope it helps!!

Mario

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

3 followers

Stats

Asked: 2017-11-28 03:49:25 -0600

Seen: 509 times

Last updated: Dec 18 '19