Exemple #1
0
def main():
    method_gt = "gt"
    gt_file_static = "/home/sietse/PrelimExpStaticVsDynamic/SL_58_NV_0_SV_1_gt.txt"
    gt_ps_static = 'k-'
    gt_file_dynamic = "/home/sietse/PrelimExpStaticVsDynamic/SL_58_NV_40_SV_1_gt.txt"
    gt_ps_dynamic = 'k-.'

    with CarlaSlamEvaluate(method_gt, gt_file_static,
                           gt_ps_static) as gt_static:
        gt_static.process_data()

    with CarlaSlamEvaluate(method_gt, gt_file_dynamic,
                           gt_ps_dynamic) as gt_dynamic:
        gt_dynamic.process_data()

    method_orb = "orb"
    orb_file_static = "/home/sietse/PrelimExpStaticVsDynamic/SL_58_NV_0_SV_1_orb.txt"
    orb_ps_static = 'b-'
    orb_file_dynamic = "/home/sietse/PrelimExpStaticVsDynamic/SL_58_NV_40_SV_1_orb.txt"
    orb_ps_dynamic = 'r-'
    with CarlaSlamEvaluate(method_orb, orb_file_static,
                           orb_ps_static) as orb_static:
        orb_static.process_data()

    with CarlaSlamEvaluate(method_orb, orb_file_dynamic,
                           orb_ps_dynamic) as orb_dynamic:
        orb_dynamic.process_data()

    distance = 50

    plt.rcParams['axes.grid'] = True
    # evaluate_RPE_dist([gt_dynamic], [orb_dynamic], distance)
    evaluate_RPE_dist([gt_static, gt_dynamic], [orb_static, orb_dynamic],
                      distance)
    plt.show()
Exemple #2
0
def main():
    method_gt = "gt"
    gt_ps_static = 'k-'
    gt_file_static = "/home/sietse/official_experiment_data/SL_40_NV_0_SV_1_gt.txt"
    # gt_file_static = "/home/sietse/PrelimExpStaticVsDynamic/SL_58_NV_0_SV_1_gt.txt"
    with CarlaSlamEvaluate(method_gt, gt_file_static,
                           gt_ps_static) as gt_static:
        gt_static.process_data()

    method_orb = "orb"
    orb_ps_static = 'g-'
    orb_file_static = "/home/sietse/official_experiment_data/SL_40_NV_0_SV_1_orb_2.txt"
    # orb_file_static = "/home/sietse/PrelimExpStaticVsDynamic/SL_58_NV_0_SV_1_orb.txt"

    with CarlaSlamEvaluate(method_orb, orb_file_static,
                           orb_ps_static) as orb_static:
        orb_static.process_data()

    plt.rcParams['axes.grid'] = True

    GT = [gt_static]
    SLAM = [orb_static]
    time_step = 1.0

    evaluate_RPE_time(GT, SLAM, time_step)
    plt.show()
Exemple #3
0
def main():
    orb_static_1f = "/home/sietse/official_experiment_data/SL_40_NV_0_SV_1_orb_1.txt"
    orb_static_2f = "/home/sietse/official_experiment_data/SL_40_NV_0_SV_1_orb_2.txt"
    orb_static_3f = "/home/sietse/official_experiment_data/SL_40_NV_0_SV_1_orb_3.txt"
    orb_static_4f = "/home/sietse/official_experiment_data/SL_40_NV_0_SV_1_orb_4.txt"
    orb_static_5f = "/home/sietse/official_experiment_data/SL_40_NV_0_SV_1_orb_5.txt"

    with CarlaSlamEvaluate("orb", orb_static_1f, 'r--') as orb_static_1:
        orb_static_1.process_data()

    with CarlaSlamEvaluate("orb", orb_static_2f, 'b--') as orb_static_2:
        orb_static_2.process_data()

    with CarlaSlamEvaluate("orb", orb_static_3f, 'c--') as orb_static_3:
        orb_static_3.process_data()

    with CarlaSlamEvaluate("orb", orb_static_4f, 'm--') as orb_static_4:
        orb_static_4.process_data()

    with CarlaSlamEvaluate("orb", orb_static_5f, 'g--') as orb_static_5:
        orb_static_5.process_data()

    timestep = 0.025
    SLAM = [
        orb_static_1, orb_static_2, orb_static_3, orb_static_4, orb_static_5
    ]
    AverageStatic = average_orb(SLAM, timestep, 'orb_static', 'r-')
    SLAM.append(AverageStatic)
    # print(len(AverageStatic.time), len(AverageStatic.orientations))
    evaluate_pose.compare_position(SLAM)
    evaluate_pose.compare_euler_angles(SLAM)
    evaluate_pose.compare_quaternions(SLAM)

    plt.show()
Exemple #4
0
def main():
    method_gt = "gt"
    gt_file1 = "/home/sietse/SL_40_NV_40_SV_1_gt.txt"
    gt_file2 = "/home/sietse/SL_40_NV_0_SV_1_gt.txt"

    with CarlaSlamEvaluate(method_gt, gt_file1, 'r-') as gt_dynamic:
        gt_dynamic.process_data()

    with CarlaSlamEvaluate(method_gt, gt_file2, 'b-') as gt_static:
        gt_static.process_data()

    gt_consistency(gt_dynamic, gt_static)
    plt.show()
Exemple #5
0
def main():
    """Test file to incorporate the ATE of the TUM benchmark"""

    floc_gt = "/home/sietse/official_experiment_data/SL_20_NV_0_SV_1_gt.txt"
    floc_slam = "/home/sietse/official_experiment_data/SL_20_NV_0_SV_1_orb.txt"

    with CarlaSlamEvaluate("gt", floc_gt, 'k-') as gt:
        gt.process_data()

    with CarlaSlamEvaluate("orb", floc_slam, "g-") as slam:
        slam.process_data()

    # matches -- list of matched tuples ((stamp1,data1),(stamp2,data2))
    matches = match_gt_slam(gt, slam)
    print(matches)
    print(matches(0))
Exemple #6
0
def load_experiment(flocation, SL):
    """Loads the dynamic and static data based on the starting location"""
    floc_gt_static = flocation + "SL_{}_NV_0_SV_1_gt.txt".format(SL)
    floc_gt_dynamic = flocation + "SL_{}_NV_40_SV_1_gt.txt".format(SL)

    method_gt = "gt"
    with CarlaSlamEvaluate(method_gt, floc_gt_static, 'k-') as gt_static:
        gt_static.process_data()

    with CarlaSlamEvaluate(method_gt, floc_gt_dynamic, 'k--') as gt_dynamic:
        gt_dynamic.process_data()

    floc_orb_static = flocation + "SL_{}_NV_0_SV_1_orb.txt".format(SL)
    floc_orb_dynamic = flocation + "SL_{}_NV_40_SV_1_orb.txt".format(SL)

    method_orb = "orb"

    with CarlaSlamEvaluate(method_orb, floc_orb_static, 'b-') as orb_static:
        orb_static.process_data()

    with CarlaSlamEvaluate(method_orb, floc_orb_dynamic, 'r--') as orb_dynamic:
        orb_dynamic.process_data()

    return gt_static, gt_dynamic, orb_static, orb_dynamic
Exemple #7
0
SL = "40"
file_string_static = file_loc + "bp_SL_{}_NV_0_SV_1_orb_{}.txt"
file_string_dynamic = file_loc + "bp_SL_{}_NV_40_SV_1_orb_{}.txt"
file_gt_dyn = "/home/sietse/official_experiment_data/SL_{}_NV_40_SV_1_gt.txt"
file_gt_stat = "/home/sietse/official_experiment_data/SL_{}_NV_0_SV_1_gt.txt"

# list with all orb data in CarlaSlamEvaluate objects
orb_static_objects = []
orb_dynamic_objects = []
orb_all = []
#  read all orb data
for i in range(5):
    i = i + 1
    static_plot = "C{}-".format(i)
    dynamic_plot = "C{}--".format(i)
    with CarlaSlamEvaluate("orb", file_string_static.format(SL, i),
                           static_plot) as orb_static:
        orb_static.process_data()
    orb_static_objects.append(orb_static)
    orb_all.append(orb_static)
    with CarlaSlamEvaluate("orb", file_string_dynamic.format(SL, i),
                           dynamic_plot) as orb_dynamic:
        orb_dynamic.process_data()
    orb_dynamic_objects.append(orb_dynamic)
    orb_all.append(orb_dynamic)

# read ground truth data
with CarlaSlamEvaluate("gt", file_gt_stat.format(SL), 'k-') as gt_static:
    gt_static.process_data()

with CarlaSlamEvaluate("gt", file_gt_dyn.format(SL), 'k--') as gt_dyn:
    gt_dyn.process_data()
Exemple #8
0
from scenario_labelling import *

orb_static_1f = "/home/sietse/official_experiment_data/SL_40_NV_0_SV_1_orb_1.txt"
orb_static_2f = "/home/sietse/official_experiment_data/SL_40_NV_0_SV_1_orb_2.txt"
orb_static_3f = "/home/sietse/official_experiment_data/SL_40_NV_0_SV_1_orb_3.txt"
orb_static_4f = "/home/sietse/official_experiment_data/SL_40_NV_0_SV_1_orb_4.txt"
orb_static_5f = "/home/sietse/official_experiment_data/SL_40_NV_0_SV_1_orb_5.txt"
orb_1 = "/home/sietse/official_experiment_data/SL_40_NV_40_SV_1_orb_1.txt"
orb_2 = "/home/sietse/official_experiment_data/SL_40_NV_40_SV_1_orb_2.txt"
orb_3 = "/home/sietse/official_experiment_data/SL_40_NV_40_SV_1_orb_3.txt"
orb_4 = "/home/sietse/official_experiment_data/SL_40_NV_40_SV_1_orb_4.txt"
orb_5 = "/home/sietse/official_experiment_data/SL_40_NV_40_SV_1_orb_5.txt"
file_gt_dyn = "/home/sietse/official_experiment_data/SL_40_NV_40_SV_1_gt.txt"
file_gt_stat = "/home/sietse/official_experiment_data/SL_40_NV_0_SV_1_gt.txt"

with CarlaSlamEvaluate("gt", file_gt_dyn, 'k-') as gt_dyn:
    gt_dyn.process_data()

with CarlaSlamEvaluate("gt", file_gt_stat, 'k--') as gt_stat:
    gt_stat.process_data()

with CarlaSlamEvaluate("orb", orb_static_1f, 'r--') as orb_static_1:
    orb_static_1.process_data()

with CarlaSlamEvaluate("orb", orb_static_2f, 'b--') as orb_static_2:
    orb_static_2.process_data()

with CarlaSlamEvaluate("orb", orb_static_3f, 'c--') as orb_static_3:
    orb_static_3.process_data()

with CarlaSlamEvaluate("orb", orb_static_4f, 'm--') as orb_static_4: