How to run roscore or roslaunch when i boot
I'm using ubuntu 16.04 LTS and Ros Kinetic version.
How to run roscore or roslaunch automatically when i boot .
i tried add script /etc/init.d and /etc/rc.local , but they didn't work.
How can i do ?
Edit: Thank you for your answer.
I follow your advise using systemd.
but i have some error with this method like this.
5월 08 17:56:00 Jo startup.sh[3794]: lcd: cannot connect to X server
5월 08 17:56:00 Jo startup.sh[3794]: [lcd-2] process has died [pid 3868, exit code 1, cmd /home/jo/catkin_ws/devel/lib/lcd/lcd __name:=lcd __log:=/root/.ros/log/a1512d42-529d-11e8-a4c9-00012957ec7a/lcd-2.log].
5월 08 17:56:00 Jo startup.sh[3794]: log file: /root/.ros/log/a1512d42-529d-11e8-a4c9-00012957ec7a/lcd-2*.log
5월 08 18:03:39 Jo systemd[1]: Started start roslaunch.
what can i do ?