コード例 #1
0
def video(category=None, exp=None):
    if not ensure_application_started('openease/' + ROS_DISTRIBUTION +
                                      '-knowrob-daemon'):
        return redirect(url_for('user.logout'))
    session['video'] = True
    return __knowrob_page__('video.html', session['user_container_name'],
                            category, exp)
コード例 #2
0
ファイル: editor.py プロジェクト: bbferka/docker
def editor(filename=""):
    if not ensure_application_started('knowrob/'+ros_distro+'-knowrob-daemon'):
        return redirect(url_for('user.logout'))

    error=""
    # determine hostname/IP we are currently using
    # (needed for accessing container)
    host_url = urlparse(request.host_url).hostname
    container_name = session['user_container_name']

    return render_template('editor.html', **locals())
コード例 #3
0
def editor(filename=""):
    if not ensure_application_started('knowrob/hydro-knowrob-daemon'):
        return redirect(url_for('user.logout'))

    error = ""
    # determine hostname/IP we are currently using
    # (needed for accessing container)
    host_url = urlparse(request.host_url).hostname
    container_name = session['user_container_name']

    return render_template('editor.html', **locals())
コード例 #4
0
ファイル: knowrob.py プロジェクト: pcj8670/docker
def __knowrob_page__(template, docker_ros=True, category=None, exp=None):
    if not ensure_application_started('knowrob/hydro-knowrob-daemon'):
        return redirect(url_for('user.logout'))
    error=""
    # determine hostname/IP we are currently using
    # (needed for accessing container)
    host_url = urlparse(request.host_url).hostname
    container_name = session['user_container_name']
    if category is not None: session['exp-category'] = category
    if exp is not None:      session['exp-name'] = exp
    if 'exp-category' in session: category = session['exp-category']
    if 'exp-name' in session: exp = session['exp-name']
    
    exp_url = get_experiment_download_url()
    return render_template(template, **locals())
コード例 #5
0
def __knowrob_page__(template, docker_ros=True, category=None, exp=None):
    if not ensure_application_started('knowrob/hydro-knowrob-daemon'):
        return redirect(url_for('user.logout'))
    error = ""
    # determine hostname/IP we are currently using
    # (needed for accessing container)
    host_url = urlparse(request.host_url).hostname
    container_name = session['user_container_name']
    if category is not None: session['exp-category'] = category
    if exp is not None: session['exp-name'] = exp
    if 'exp-category' in session: category = session['exp-category']
    if 'exp-name' in session: exp = session['exp-name']

    exp_url = get_experiment_download_url()
    return render_template(template, **locals())
コード例 #6
0
ファイル: views.py プロジェクト: macnlinux/docker
def video(exp_path=None):
    session['video'] = 1
    if not ensure_application_started('knowrob/hydro-knowrob-daemon'):
        return redirect(url_for('user.logout'))
    
    error=""
    # determine hostname/IP we are currently using
    # (needed for accessing container)
    host_url = urlparse(request.host_url).hostname
    container_name = session['user_container_name']

    # Remember experiment selection
    if exp_path is not None: session['exp'] = exp_path
    # Select a query file
    exp_query_file = None
    if 'exp' in session:
        exp = session['exp']
        if exp is not None: exp_query_file = exp + '.json'
    
    return render_template('video.html', **locals())
コード例 #7
0
ファイル: knowrob.py プロジェクト: chiar1games/docker-4
def knowrob(category=None, exp=None):
    if not ensure_application_started('knowrob/hydro-knowrob-daemon'):
        return redirect(url_for('user.logout'))
    session['video'] = False
    return __knowrob_page__('knowrob_simple.html',
                            session['user_container_name'], category, exp)
コード例 #8
0
ファイル: knowrob.py プロジェクト: bbferka/docker
def video(category=None, exp=None):
    if not ensure_application_started('knowrob/'+ros_distro+'-knowrob-daemon'):
        return redirect(url_for('user.logout'))
    session['video'] = True
    return __knowrob_page__('video.html', session['user_container_name'], category, exp)
コード例 #9
0
ファイル: knowrob.py プロジェクト: asilx/docker
def knowrob(category=None, exp=None):
    if not ensure_application_started('openease/'+ROS_DISTRIBUTION+'-knowrob-daemon'):
        return redirect(url_for('user.logout'))
    session['video'] = False
    return __knowrob_page__('knowrob_simple.html', session['user_container_name'], category, exp)