ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
3

How to start a ROS node on startup?

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

Luis Ruiz gravatar image

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

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
9

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

gvdhoorn gravatar image

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

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

Comments

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 -0600 )edit
1

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

Rabe gravatar image

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

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

Comments

1

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

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

Question Tools

2 followers

Stats

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

Seen: 20,911 times

Last updated: Sep 11 '20