ROS-Rtabmap:linux shell运行多个shell(运行多个程序)

27 篇文章 1 订阅
7 篇文章 0 订阅

在linux中开启多个窗口,需要切换,比较麻烦,可以写入到一个脚本中,可以同时打开多个console/shell。

shell代码如下:

#!/bin/bash
# by wishchin 2020-05-12  version 1.0
## # Option “-x” is deprecated and might be removed in a later version of gnome-terminal.
## Use “-- ” to terminate the options and put the command line to execute after it.

#start
source ~/catkin_ws/devel/setup.bash
{
#python service......
gnome-terminal -t "python_trans" -x bash -c "python2 point_2_image2.py;exec bash"
}&

sleep 3s
{
#roscore
gnome-terminal -t "roscore" -x bash -c "roscore;exec bash"
}&

sleep 3s
{
#cloud process!
gnome-terminal -t "rtab_cloud_pro" -x bash -c "rosrun nlink rtab_cloud_pro;exec bash"
}&

sleep 5s
{
#rs_rtabmap.launch
gnome-terminal -t "rs_rtabmap" -x bash -c "cd ~/catkin_ws;roslaunch src/realsense-ros/realsense2_camera/launch/rs_rtabmap.launch  ;exec bash"
}&

#end 

结果:在一个shell中打开多个tab,依次运行!

 一個對齊四個坐標系統的c重建与导航系统:

 

  • 1
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值