def read_args_with_defaults(arg_defaults):
    "Look up parameters starting in the driver's private parameter space, but also searching outer namespaces.\n    Defining them in a higher namespace allows the axis_ptz.py script to share parameters with the driver."
    args = {}
    for (name, val) in arg_defaults.iteritems():
        full_name = rospy.search_param(name)
        if (full_name is None):
            args[name] = val
        else:
            args[name] = rospy.get_param(full_name, val)
    if (args['frame_id'][0] != '/'):
        tf_prefix = rospy.search_param('tf_prefix')
        prefix_val = ''
        if (tf_prefix is not None):
            prefix_val = rospy.get_param(tf_prefix)
            if (prefix_val[0] != '/'):
                prefix_val = ('/' + prefix_val)
        args['frame_id'] = ((prefix_val + '/') + args['frame_id'])
    return args
Look up parameters starting in the driver's private parameter space, but also searching outer namespaces.
Defining them in a higher namespace allows the axis_ptz.py script to share parameters with the driver.
def read_args_with_defaults(arg_defaults):
    "Look up parameters starting in the driver's private parameter space, but also searching outer namespaces.\n    Defining them in a higher namespace allows the axis_ptz.py script to share parameters with the driver."
    args = {}
    for (name, val) in arg_defaults.iteritems():
        full_name = rospy.search_param(name)
        if (full_name is None):
            args[name] = val
        else:
            args[name] = rospy.get_param(full_name, val)
    if (args['frame_id'][0] != '/'):
        tf_prefix = rospy.search_param('tf_prefix')
        prefix_val = 
        if (tf_prefix is not None):
            prefix_val = rospy.get_param(tf_prefix)
            if (prefix_val[0] != '/'):
                prefix_val = ('/' + prefix_val)
        args['frame_id'] = ((prefix_val + '/') + args['frame_id'])
    return args