Ask Your Question
1

Robot_upstart

asked 2015-02-08 14:14:27 -0600

raarenst gravatar image

updated 2015-02-09 01:50:10 -0600

BennyRe gravatar image

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 ...
(more)
edit retag flag offensive close merge delete

Comments

I have changed to pkg/path:

odroid@odroidU2a:~$ rosrun robot_upstart install counter/launch/counterstart.launch --interface wlan2

but still the same thing.

raarenst gravatar imageraarenst ( 2015-02-09 21:58:04 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
6

answered 2015-02-10 07:30:58 -0600

Ack, sorry you're having this issue. This is exactly the sort of problem which prompted the recent rewrite of the package from Bash to Python. This has been released for about three weeks, but it looks like Austin's ARM buildfarm is still building version 0.0.6, rather than 0.1.1.

If you'd like to try the new version, I suggest using it from a source workspace.

edit flag offensive delete link more

Comments

1

Thanks, it worked fine from source!

Is there a recommended way to remove an upstart job?

raarenst gravatar imageraarenst ( 2015-02-10 17:53:44 -0600 )edit

At present, just delete the /etc/init/jobname.conf file.

mikepurvis gravatar imagemikepurvis ( 2015-02-11 18:47:07 -0600 )edit
1

Now uninstall seems to be an option.

130s gravatar image130s ( 2018-01-29 02:21:16 -0600 )edit
0

answered 2015-02-09 22:33:10 -0600

jseal gravatar image

It's been a while but I ran into a similar issue with robot_upstart. Here's the process I recorded to get it to work properly. One of the key things I noted was no underscore in launch file or path. I still got the issue with the pushd, but the second command fixes it. Hope this helps.

   #No underscores in the launch filename or path  
   rosrun robot_upstart install mystartup.launch --interface eth1

    #due to a pushd error manaul copy
    sudo cp mystartup.launch /etc/ros/indigo/mystartup.launch.d/

    #should start on boot, but to manually start run:
    mystartup.launch-start

    # To Uninstall
    sudo rm /etc/init/mystartup.launch.conf
    sudo rm -rf /etc/ros/indigo/mystartup.launch.d/
    sudo rm /usr/sbin/mystartup.launch-start /usr/sbin/mystartup.launch-stop
edit flag offensive delete link more

Comments

If the issues you encountered are still present in robot_upstart, I would recommend reporting them to the issue tracker. The package has recently been rewritten, so some things might work better / are maybe broken.

gvdhoorn gravatar imagegvdhoorn ( 2015-02-10 01:37:58 -0600 )edit

It works fine now, but I had run into the pushd error in the past and made a note of it, but an update must have fixed it.

jseal gravatar imagejseal ( 2015-02-10 19:09:08 -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

1 follower

Stats

Asked: 2015-02-08 14:14:27 -0600

Seen: 2,070 times

Last updated: Feb 10 '15