The install script

Use this tool to quickly and easily create system startup jobs which run one or more ROS launch files as a daemonized background process on your computer. More advanced users will prefer to access the Python API from their own setup scripts, but this exists as a simple helper, an example, and a compatibility shim for previous versions of robot_upstart which were bash-based.

usage: install [-h] [--job JOB] [--interface ethN] [--user NAME]
               [--setup path/to/setup.bash] [--rosdistro DISTRO]
               [--master http://MASTER:11311] [--logdir path/to/logs]
               [--augment]
               pkg/path [pkg/path ...]
Positional arguments:
pkgpath Package and path to install job launch files from.
Options:
--job Specify job name. If unspecified, will be constructed from package name.
--interface Specify network interface name to associate job with.
--user Specify user to launch job as.
--setup Specify workspace setup file for the job launch context.
--rosdistro Specify ROS distro this is for.
--master Specify an alternative ROS_MASTER_URI for the job launch context.
--logdir Specify an a value for ROS_LOG_DIR in the job launch context.
--augment=False
 Bypass creating the job, and only copy user files. Assumes the job was previously created.

Permissions

It’s important to understand how permissions work robot_upstart:

  1. The upstart job invokes its jobname-start bash script as root.
  2. The script sets up environment variables, and then uses setuidgid to execute roslaunch as an unprivileged user. This is by default the user who ran the install script, but it can also be specified explicitly via a flag.
  3. The roslaunch which executes does not have its user’s group memberships. This means that it will not have access to serial ports with the dialout group, or locations in /var/log owned by root, etc. Any filesystem resources needed by your ROS nodes should be chowned to the same unprivileged user which will run ROS, or should set to world readable/writeable, for example using udev.

Implementation

If you’re in the process of transitioning from using the install script to the Python API, it may be helpful to inspect exactly how the script uses the API. You can find its implementation in the robot_upstart.install_script.main() function.

robot_upstart.install_script.main()[source]

Implementation of the install script.

Table Of Contents

Previous topic

Upstart for ROS Robots

Next topic

The uninstall script

This Page