Robotics StackExchange | Archived questions

Autostart ROS

I need to autostart roscore and some nodes and also some other programs at the system startup. I'm trying since several hours but don't get it working, I'm using groovy on raspbian:

1. (all following done as root) I tryed to add "roscore" in the /etc/rc.local before exit 0. If I start /etc/rc.local, I get the error "roscore: not found". But if I just enter "roscore" in terminal it starts without problems. I also added "source /opt/ros/groovy/setup.bash" and "source /home/pi/ros/devel/setup.bash" in the /etc/rc.local before roscore, but it just says "source: not found".

2. So I wrote an own script and added it to the default runlevels. I can start the script manually and roscore starts, I can also stop it manually. I added it with "sudo update-rc.d defaults" which showed no error. In the folder rc2.d I have for example the link S04 (I'm working in runlevel 2). But the script is not starting at system startup... I have "Required-Start: $all" might that be a problem?

Can anyone help me with that, I'm not getting forward here...

Kind regards! Jonny

Asked by Johannes Jaegers on 2014-03-18 10:44:02 UTC

Comments

Answers

I hear this library is somewhat handy for automatically starting up ROS: http://wiki.ros.org/robot_upstart

Asked by AlphaSierra on 2014-03-18 11:30:05 UTC

Comments

Topic was closed by the admin, however it might be helpful for people still searching for this how I solved it on Raspbian: Just copied the scripts that need to be sourced (see above) directly into the /etc/rc.local.

Asked by Johannes Jaegers on 2016-08-22 22:51:46 UTC