diff --git a/exercise-session-2.ipynb b/exercise-session-2.ipynb index e9dea076c0e8d5f6435c469b0b4d39c50a23abce..43c03e3e4aa79503680047325fffa87812375781 100644 --- a/exercise-session-2.ipynb +++ b/exercise-session-2.ipynb @@ -32,6 +32,7 @@ "import src.plotters as plotters\n", "import src.models as models\n", "import src.logic as logic\n", + "from src.utility import match_tracks_to_ground_truth, save_result\n", "# Get the necessary trajectories\n", "trajectories = get_ex2_trajectories()\n", "trajs = ['T1', 'T3', 'T5', 'T6'] # Select the trajectories to use\n", @@ -156,7 +157,6 @@ "metadata": {}, "outputs": [], "source": [ - "from src.utility import match_tracks_to_ground_truth\n", "jpda_matches = match_tracks_to_ground_truth(jpda_confirmed_tracks, filtered_trajs)\n", "gnn_matches = match_tracks_to_ground_truth(gnn_confirmed_tracks, filtered_trajs)\n", "jpdaresult = dict(matches=jpda_matches, \n", @@ -166,7 +166,9 @@ "gnnresult = dict(matches=gnn_matches, \n", " tracks=gnn_tracks, \n", " confirmed_tracks=gnn_confirmed_tracks,\n", - " Y=Y)" + " Y=Y)\n", + "save_result('jpda_result_sim', jpdaresult)\n", + "save_result('gnn_result_sim', gnnresult)" ] }, { @@ -234,7 +236,7 @@ "The filter was chosen as an EKF for simplicity (and it seemed to work fine).\n", "\n", "##### **Initialization**\n", - "The tracks were initialized at the measurement (converted to the positional domain) with a $0$ velocity. The initial uncertainty was set to $\\mathbf{P}_0=\\mathsc{diag}[100, 100, 1000, 1000]$ to account for the unknown initial velocity. The track score is initially set to $L_t=0$.\n" + "The tracks were initialized at the measurement (converted to the positional domain) with a $0$ velocity. The initial uncertainty was set to $\\mathbf{P}_0=\\mathrm{diag}[100, 100, 1000, 1000]$ to account for the unknown initial velocity. The track score is initially set to $L_t=0$.\n" ] }, { @@ -337,6 +339,17 @@ "#### Comments\n", "Both the GNN and JPDA manage to keep both tracks the entire time. The GNN results in two \"U\"-shaped tracks whereas the JPDA results in \"S\"-shaped tracks. Without more information, it is impossible to say which is correct. However, the JPDA tracker results in a smoother trajectory, probably because of the soft measurement assignments." ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "99bb7ff2-1b69-4468-b9d6-7590a4870863", + "metadata": {}, + "outputs": [], + "source": [ + "save_result('jpda_result_myst', jpda_result)\n", + "save_result('gnn_result_myst', gnn_result)" + ] } ], "metadata": {