1. 创建一个start_ROS.sh文件
2. 加入类似如下的代码(改为自己的roslaunch):
#!/bin/bash #source bash source ~/rocon/devel/setup.bash source ~/kobuki/devel/setup.bash source ~/turtlebot/devel/setup.bash source ~/turtlebot_ws/devel/setup.bash source ~/catkin_ws/devel/setup.bash #远程master(需要写) export ROS_MASTER_URI=http://192.168.3.75:11311 export ROS_HOSTNAME=192.168.3.165 #启动底盘 gnome-terminal --window -e "roslaunch turtlebot_bringup minimal.launch" #等待10s sleep 10s #启动激光雷达gmapping gnome-terminal --window -e "roslaunch turtlebot_navigation rplidar_gmapping_demo.launch" wait exit 0
3. 开启权限
chmod +x start_ROS.sh
4. 测试运行.sh文件
./start_ROS.sh
5. 没有问题后,加入自启动列表
终端运行:gnome-session-properties
添加进去



