linux下shell启动多个终端运行程序

参考链接
https://blog.csdn.net/m_zhangJingDong/article/details/79107099

#!/bin/bash
dev1="/dev/ttyUSB0";
dev2="/dev/ttyUSB0";
source ~/catkin_ws/devel/setup.bash
{
gnome-terminal -t "start_robot" -x bash -c "roslaunch xt-robot xt_start.launch;exec bash"
}&

sleep 1s
{
gnome-terminal -t "Recv_pair" -x bash -c "rosrun xt-robot tof_to_kunlun ${dev1} Recv Pair;exec bash"
}&

sleep 1s
{
gnome-terminal -t "Recv_P2P" -x bash -c "rosrun xt-robot tof_to_kunlun ${dev2} Recv P2P;exec bash"
}&

sleep 1s
{
gnome-terminal -t "Send_data" -x bash -c "rosrun xt-robot tof_to_kunlun ${dev1} Send;exec bash"
}&

sleep 10s
{
gnome-terminal -t "Bag_record" -x bash -c "cd ~/catkin_ws;rosbag record -o /odom /scan_1 ;exec bash"
}&
#{
#gnome-terminal -t "XXD1" -x bash -c "sh /home/laoxia/total_shells/show_img1.sh;exec bash"
#}&

你可能感兴趣的:(linux下shell启动多个终端运行程序)