Robot_upstart
After quite some search I think robot_upstart would be the best way to call a launch file during boot. Howeve, it seems to be hard to get up and running. The documentation is about usage but installation seems to be an issue (for me at least).
I'm running ROS indigo on an odroid U2.
I have a launch file created basically from the tutorials and a cpp project with a counter as service and publisher. I can run the launchfile and it starts up fine. I can call the service from another odroid as well, so that part seems to work fine.
I installed the ros-indigo-robot-upstart package with apt-get. rosrun didn't find it so I made a rosbuild robot_update. Now rosrun finds it. Then I try to run:
odroid@odroidU2a:~$ rosrun robot_upstart install RosProjects/catkin_ws/src/counter/launch/counterstart.launch --interface wlan2
sudo: a password is required
Re-invoking installation script as root.
[sudo] password for odroid:
grep: Invalid range end
grep: Invalid range end
grep: Invalid range end
grep: Invalid range end
/opt/ros/indigo/lib/robot_upstart/install: line 136: source: /bin/true: cannot execute binary file
Installing odroidindigo job using network interface true.
/opt/ros/indigo/lib/robot_upstart/install: line 153: rosrun: command not found
/opt/ros/indigo/lib/robot_upstart/install: line 154: rosrun: command not found
/opt/ros/indigo/lib/robot_upstart/install: line 155: rosrun: command not found
/opt/ros/indigo/lib/robot_upstart/install: line 162: rospd: command not found
Adding files to odroidindigo job: odroidindigo/home/odroid/RosProjects/catkin_ws/devel/setup.bashRosProjects/catkin_ws/src/counter/launch/counterstart.launchwlan2/*
/opt/ros/indigo/lib/robot_upstart/install: line 168: pushd: home/odroid/RosProjects/catkin_ws/devel/setup.bashRosProjects/catkin_ws/src/counter/launch/counterstart.launchwlan2: No such file or directory
cp: omitting directory 'etc'
cp: omitting directory 'include'
cp: omitting directory 'lib'
cp: omitting directory 'share'
/opt/ros/indigo/lib/robot_upstart/install: line 170: popd: directory stack empty
/opt/ros/indigo/lib/robot_upstart/install: line 172: popd: directory stack empty
I'm completely lost here. Anyone having an idea what could be wrong? As it seems it can't identify rosrun from sudo I have also tried to invoke the command as root and source the ros setup.bash. Then I get:
root@odroidU2a:/home/odroid# rosrun robot_upstart install /home/odroid/RosProjects/catkin_ws/src/counter/launch/counterstart.launch --interface wlan2
bash: rosrun: command not found
root@odroidU2a:/home/odroid# source /opt/ros/indigo/setup.bash
root@odroidU2a:/home/odroid# rosrun robot_upstart install /home/odroid/RosProjects/catkin_ws/src/counter/launch/counterstart.launch --interface wlan2
grep: Invalid range end
/opt/ros/indigo/lib/robot_upstart/install: line 136: source: filename argument required
source: usage: source filename [arguments]
Installing job using network interface true.
usage: start_gen [-h] --setup SETUP --rosdistro ROSDISTRO --job JOB --master
MASTER --user USER --interface INTERFACE
[outfile]
start_gen: error: argument --job: expected one argument
usage: stop_gen [-h] --job JOB [outfile]
stop_gen: error: argument --job: expected one argument
usage: job_conf_gen [-h] --interface INTERFACE --job JOB [outfile]
job_conf_gen: error: argument --job: expected one ...
I have changed to pkg/path:
odroid@odroidU2a:~$ rosrun robot_upstart install counter/launch/counterstart.launch --interface wlan2
but still the same thing.