Method Reference: Http://ros-users.122217.n3.nabble.com/auto-start-ROS-launch-script-on-boot-up-td1687093.html
Step 1:write a script which contains Ros commands like Roslaunch, Roscore, etc. The script would
Look somewhat like this:
#! /bin/bash
source/opt/ros/hydro/setup.sh
Roscore
Note the second line source/opt/ros/hydro/setup.sh this is the path of Ros bash. We need to
Source Ros setup In our script before we use any of the Ros commands.
Step 2:make The script executable by using command
sudo chmod +x/path/to/script.sh
Step 3:go to System-->preferences--and Startup application
Step 4:click on Add application or Add tab, a window would popup. Add name say "Rosnome"
Step 5:on The given window in the Command tab type
Gnome-terminal-x/path/to/script.sh
Step 6:type Whatever you want on the comment space or leave blank and click Add
Step 7:on the terminal Edit-->profile preferences-->title and command tab Select when command
Exits hold the terminal open
Step 8:reboot system and your application would auto start on boot every time.
Note:it isn't possible or rather a bit difficult job to open multiple terminals from a single script so
It is recommended to use a single Ros launch file for the entire robot which would include
Everything.
Start-Up Ros script