A roshrc.py file contains Python code that is automatically run whenever you run rosh in interactive mode. The most common commands you may want to put into this file is your default plugin configuration.

roshrc.py should be stored in ~/.ros/rosh/roshrc.py, or $ROS_HOME/rosh/roshrc.py if you have ROS_HOME set.


In order to simplify the loading of plugins, you can simply assign the plugins variable to be a list of plugins that you wish to load.

When you invoke rosh from the command-line, you can also pass in a list of plugins to load. To allow you to check for this, rosh sets the value of plugins to be the plugins that were passed in on the command-line.

Example 1: Always load the rosh_common and rosh_geometry plugin

  • plugins=['rosh_common', 'rosh_geometry']

Example 2: Only load the rosh_common and rosh_visualization plugins if no plugins were specified on the command-line:

  • if not plugins:
      plugins=['rosh_common', 'rosh_visualization']

Wiki: rosh/roshrc (last edited 2013-03-27 00:50:37 by JackOQuin)