Ask Your Question
2

How to start a ROS node on startup??

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

Luis Ruiz gravatar image

updated 2016-03-18 07:29:41 -0600

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 imageshoemakerlevy9 ( 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 imageBennyRe ( 2014-09-22 04:25:58 -0600 )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

2 followers

Stats

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

Seen: 13,585 times

Last updated: Mar 18 '16