Package roswtf :: Module environment
[frames] | no frames]

Module environment

source code

Rules for checking ROS environment state.

Functions
[str]
paths(path)
Returns: paths contained in path variable.
source code
bool
is_executable(path)
Returns: True if path has executable permissions
source code
str
invalid_url(url)
Returns: error message if  url is not a valid url.
source code
 
ros_root_check(ctx, ros_root=None) source code
 
ros_home_check(ctx) source code
 
ros_log_dir_check(ctx) source code
 
ros_test_results_dir_check(ctx) source code
 
pythonpath_check(ctx) source code
 
rosconsole_config_file_check(ctx) source code
 
path_check(ctx) source code
 
ros_master_uri_hostname(ctx) source code
 
boost_check(ctx) source code
 
wtf_check_environment(ctx) source code
Variables
  environment_warnings = [(path_check, "PATH has /usr/bin set be...
  environment_errors = [(lambda ctx: not isdir(ctx.ros_root), "R...
  __package__ = 'roswtf'
Function Details

paths(path)

source code 
Returns: [str]
paths contained in path variable. path must conform to OS conventions for path separation (i.e. colon-separated on Unix)

is_executable(path)

source code 
Returns: bool
True if path has executable permissions

invalid_url(url)

source code 
Returns: str
error message if  url is not a valid url.  url is allowed to be empty as that check is considered separately.

ros_root_check(ctx, ros_root=None)

source code 
Parameters:
  • ros_root (str) - override ctx, useful for when ctx is not created yet

Variables Details

environment_warnings

Value:
[(path_check, "PATH has /usr/bin set before ROS_ROOT/bin, which can ca\
use problems as there is system install of ROS on this machine. You ma\
y wish to put ROS_ROOT/bin first"), (lambda ctx: ctx.ros_package_path \
is None, "ROS_PACKAGE_PATH is not set. This is not required, but is un\
usual"), (lambda ctx: len(paths(ctx.ros_package_path))== 0, "ROS_PACKA\
GE_PATH is empty. This is not required, but is unusual"), (lambda ctx:\
 not ctx.ros_master_uri, "ROS_MASTER_URI is empty. This is not require\
d, but is unusual"), (ros_master_uri_hostname, "Cannot resolve hostnam\
...

environment_errors

Value:
[(lambda ctx: not isdir(ctx.ros_root), "ROS_ROOT [%(ros_root)s] does n\
ot point to a directory"), (ros_root_check, "ROS_ROOT is invalid: "), \
(lambda ctx: [d for d in paths(ctx.ros_package_path) if d and isfile(d\
)], "Path(s) in ROS_PACKAGE_PATH [%(ros_package_path)s] points to a fi\
le instead of a directory: "), (lambda ctx: [d for d in paths(ctx.ros_\
package_path) if d and not isdir(d)], "Not all paths in ROS_PACKAGE_PA\
TH [%(ros_package_path)s] point to an existing directory: "), (lambda \
ctx: [d for d in paths(ctx.pythonpath) if d and not isdir(d)], "Not al\
...