示例#1
0
def get_maps_path(name=''):
    """
    """
    global __maps_path
    assert_relative_path(name)

    if not __maps_path:
        robot = pal_environ.get_robot()
        pkg = pal_environ.get_maps_pkg(robot)
        __maps_path = rospkg.RosPack().get_path(pkg)

    return os.path.join(__maps_path, name)
示例#2
0
def get_maps_path(name=''):
    """
    """
    global __maps_path
    assert_relative_path(name)

    if not __maps_path:
        robot = pal_environ.get_robot()
        pkg = pal_environ.get_maps_pkg(robot)
        __maps_path = rospkg.RosPack().get_path(pkg)

    return os.path.join(__maps_path, name)
示例#3
0
def get_maps_path(name='', robot=None):
    """
    """
    global __maps_path
    assert_relative_path(name)

    if not __maps_path:
        if robot is None:
            robot = pal_environ.get_robot()
        pkg = pal_environ.get_maps_pkg(robot)
        __maps_path = os.path.join(os.getenv('HOME'), '.pal', pkg)

    return os.path.join(__maps_path, name)
示例#4
0
def get_maps_path(name='', robot=None):
    """
    """
    global __maps_path
    assert_relative_path(name)

    if not __maps_path:
        if robot is None:
            robot = pal_environ.get_robot()
        pkg = pal_environ.get_maps_pkg(robot)
        __maps_path = os.path.join(os.getenv('HOME'), '.pal', pkg)

    return os.path.join(__maps_path, name)
示例#5
0
def get_config_path(name=''):
    """
    Return the path to the configuration directory ("etc") or, if `name'
    is not empty, the given configuration subdirectory or file.

    If running on a desktop, the path depends on the $PAL_HOST environment
    variable.
    """
    assert_relative_path(name)

    path = get_base_path()
    if pal_environ.is_desktop():
        path = os.path.join(path, 'robot/sources/etc', pal_environ.get_robot())
    else:
        path = os.path.join(path, 'etc')
    return os.path.join(path, name)
示例#6
0
def get_config_path(name=''):
    """
    Return the path to the configuration directory ("etc") or, if `name'
    is not empty, the given configuration subdirectory or file.

    If running on a desktop, the path depends on the $PAL_HOST environment
    variable.
    """
    assert_relative_path(name)

    path = get_base_path()
    if pal_environ.is_desktop():
        path = os.path.join(path, 'robot/sources/etc', pal_environ.get_robot())
    else:
        path = os.path.join(path, 'etc')
    return os.path.join(path, name)