Skip to content
Snippets Groups Projects
Commit 735ba95a authored by Anton Kullberg's avatar Anton Kullberg
Browse files

bug: fixed update_track bug after rename

parent eb3ef1a8
Branches
Tags v1.2
No related merge requests found
......@@ -269,11 +269,11 @@ class GNN():
continue
else:
# Update confirmed tracks
self._update_track(meas_k[:, unused_meas][:, row], tracks[col])
self.update_track(meas_k[:, unused_meas][:, row], tracks[col])
tracks[col]['associations'].append(k) # If we've associated something, add the time here (for plotting purposes)
for i in range(len(tracks)):
if i not in col_ind:
self._update_track(np.array([]), tracks[i])
self.update_track(np.array([]), tracks[i])
# Remove any gated measurements from further consideration
tmp = unused_meas[unused_meas] # Extract the unused measurements
inds = np.where(validation_matrix.sum(axis=1))
......@@ -497,10 +497,10 @@ class JPDA():
meas = meas_k[:, unused_meas]
for ti, track in enumerate(tracks):
if validation_matrix[ti, 1:].any(): # If any measurements are validated to this track, update it accordingly
self._update_track(meas[:, validation_matrix[ti, 1:].flatten()], track, association_matrix[ti, validation_matrix[ti, :]])
self.update_track(meas[:, validation_matrix[ti, 1:].flatten()], track, association_matrix[ti, validation_matrix[ti, :]])
track['associations'].append(k) # If we've associated something, add the time here (for plotting purposes)
else:
self._update_track(np.array([]), track, None)
self.update_track(np.array([]), track, None)
# Measurements that are validated to any track can be removed from further association
tmp = unused_meas[unused_meas]
used_inds = np.where(validation_matrix[:, 1:].sum(axis=0))
......@@ -775,7 +775,7 @@ class MHT():
# Update the tracks with associated measurements
for j, association in enumerate(associations):
if association < nt: # i.e. associated to a track
self._update_track(meas_k[:, j], hypothesis[k][-1]['tracks'][association])
self.update_track(meas_k[:, j], hypothesis[k][-1]['tracks'][association])
hypothesis[k][-1]['tracks'][association]['associations'].append(k)
unused_meas[j] = 0
# Update the proability of the hypothesis for this particular association
......@@ -783,7 +783,7 @@ class MHT():
# Update tracks without an association in this particular hypothesis
for j in range(nt):
if j not in associations:
self._update_track(np.array([]), hypothesis[k][-1]['tracks'][j])
self.update_track(np.array([]), hypothesis[k][-1]['tracks'][j])
# For any still unused measurements, possibly initiate a new track
while unused_meas.any():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment