Service does not start
See original GitHub issueHello,
I am trying to use robot_upstart
with our Husky and I cannot get it to start the service, not even by running sudo service husky-core start
. In this case, it does return a pid, but it does not load anything at all (it appears to die straight away).
The command I used to install is:
rosrun robot_upstart install my_package/launch/my_launch.launch --job husky-core --interface wlan0
The nodes loaded from within the launch file are from packages installed system-wide (that is, not in my workspace).
This works on another computer, both running 12.04 + Hydro. Having said that, even on the other computer, I can load system-wide nodes, but I cannot load nodes from within my workspace.
Lastly, when I run roslaunch my_package my_launch.launch
, everything works as expected (i.e., all nodes are loaded).
I have tried specifying options for user
and the path to setup.bash
, but no luck.
Oh, just in case, yes, the wlan0 interface is up at boot time.
Any ideas/suggestions? Thanks a lot!
Issue Analytics
- State:
- Created 9 years ago
- Comments:9 (3 by maintainers)
Top GitHub Comments
The issue is that the upstart job executes as root and uses setuidgid to run the roslaunch process as the appropriate unprivileged user:
https://github.com/clearpathrobotics/robot_upstart/blob/hydro-devel/tmpl/start#L80
Unfortunately, setuidgid does not pick up the user’s group memberships, so you need a udev rule to either make the device world RW or to specifically chown it to your ROS user (administrator, on Clearpath-configured robot PCs).
The way I’ve solved this in the past is to use the setuid and setgid functionality in upstart (http://upstart.ubuntu.com/cookbook/#setgid). Instead of launching using setuidgid, call roslaunch normally but add setuid and setgid lines to the /etc/init/[job].conf file. Setuid should be set to the user to launch the nodes as and setgid should be set to dialout to allow serial port access. I’ve been modifying the output of robot_upstart manually to do this but could modify the scripts to allow a separate group to be specified if that would be useful to others.