Ask Your Question

How to start a ROS node on startup?

asked 2014-09-22 02:51:07 -0500

Luis Ruiz gravatar image

updated 2020-09-11 06:39:24 -0500

lucasw gravatar image

I am using an Odroid U3 with my robot, Ubuntu 14.04. I am using an external computer to launch the ROS node of the robot.

I was wondering if there is a way to start ROS in the robot after the Odroid starts up. Like if the robot were turned on with the ROS node running after the startup. That way I would not have to use the external computer. Right now I do not need to monitor the robot so it is OK if I do not have a roscore running externally.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2014-09-22 04:41:29 -0500

gvdhoorn gravatar image

updated 2014-09-22 04:47:18 -0500

This has been asked many times before, a simple search gives me the following answers:

Answers to both questions point the OPs to clearpathrobotics/robot_upstart and ros-system-daemon-groovy, which seem like good starting points to get something working.

Major advantage of the 'upstart' approach is that it automatically takes care of waiting for your network (and any other required services) to come up before starting roscore fi. Unless you have very specific reasons (ie: no upstart support), I'd refrain from writing something yourself.

edit flag offensive delete link more


I've started using systemctl instead of upstart. Seems like that's the way the linux community is going. In order to do this I add the file my-service.service to /etc/systemd/system that runs a bash file I've stored under /usr/sbin/my-service. It can be enable and disable using systemctl commands

shoemakerlevy9 gravatar image shoemakerlevy9  ( 2019-01-25 16:26:35 -0500 )edit

answered 2014-09-22 02:56:39 -0500

Rabe gravatar image

updated 2014-09-22 06:02:08 -0500

Google how to execute shell-script-files (not batch) in linux at startup, write yourself a script that calls your roslaunch <my_package> <my_launchfile> and presto, you'll have the node running whenever linux boots :)

edit flag offensive delete link more



Batch is for Windows. On Linux we use the Shell (Or the Bash).

BennyRe gravatar image BennyRe  ( 2014-09-22 04:25:58 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2014-09-22 02:51:07 -0500

Seen: 17,851 times

Last updated: Sep 11 '20