Example #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)
Example #2
0
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())
Example #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())
Example #4
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())
Example #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())
Example #6
0
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())
Example #7
0
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)
Example #8
0
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)
Example #9
0
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)