步骤
- 创建一个xxx.sh文件
- 填入类似如下的代码:
#!/bin/bash
source /home/lzw/catkin_ws/devel_isolated/setup.bash
gnome-terminal --window -e "roslaunch ur_gazebo ur5.launch"
sleep 2s
gnome-terminal --window -e "roslaunch ur5_moveit_config ur5_moveit_planning_execution.launch sim:=true"
sleep 2s
gnome-terminal --window -e "roslaunch ur5_moveit_config moveit_rviz.launch config:=true"
- 开启权限
- 使用chmod +x xxx.sh
- 运行.sh文件
- ./xxx.sh