Post

Lab 10: Localization (sim)

Lab 10: Localization (sim)

Compute Control

A pose is a numpy array with elements [x, y, yaw]. The compute_control() function takes the current pose and the previous pose to calculate an pre-travel rotation (delta_rot_1), travel distance (delta_trans), and post-travel rotation (delta_rot_2). The pre-travel rotation is how much the robot much rotate to face the direction of its current position. The travel distance is self-explanatory. The post-travel rotation is how much the robot much rotate to match the current position yaw. Normalization happens after calculating the angles.

\[\Delta\phi_1=\tan^{-1}(\frac{Y_1-Y_0}{X_1-X_0})\] \[\Delta d = \sqrt{(X_1-X_0)^2 + (Y_1-Y_0)^2}\] \[\Delta\phi_2= \theta_2 - \tan^{-1}(\frac{Y_1-Y_0}{X_1-X_0}) - \Delta\phi_1\]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
def compute_control(cur_pose, prev_pose):
    """ Given the current and previous odometry poses, this function extracts
    the control information based on the odometry motion model.

    Args:
        cur_pose  ([Pose]): Current Pose
        prev_pose ([Pose]): Previous Pose 

    Returns:
        [delta_rot_1]: Rotation 1  (degrees)
        [delta_trans]: Translation (meters)
        [delta_rot_2]: Rotation 2  (degrees)
    """

    dX = cur_pose[0] - prev_pose[0]
    dY = cur_pose[1] - prev_pose[1]

    # rotation to face the current position
    delta_rot_1 = math.atan2(dY, dX) - prev_pose[2]
    norm_delta_rot_1 = mapper.normalize_angle(delta_rot_1)
    
    # distance of travel
    delta_trans = math.sqrt(dX**2 + dY**2)

    # rotation to face the current position yaw
    delta_rot_2 = cur_pose[2] - math.atan2(dY, dX) - delta_rot_1
    norm_delta_rot_2 = mapper.normalize_angle(delta_rot_2)
    
    return norm_delta_rot_1, delta_trans, norm_delta_rot_2

Odometry Motion Model

The odom_motion_model() function is used to calculate the probability that the robot is at the current position given the previous position and a control data tuple. It uses the gaussian() method in the BaseLocalization class to calculate the individual probabilities for the pre-travel rotation (delta_rot_1), travel distance (delta_trans), and post-travel rotation (delta_rot_2). Then, it combines the probabilities using multiplication and returns the result. Normalization happens after calculating the angles.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
def odom_motion_model(cur_pose, prev_pose, u):
    """ Odometry Motion Model

    Args:
        cur_pose  ([Pose]): Current Pose
        prev_pose ([Pose]): Previous Pose
        (rot1, trans, rot2) (float, float, float): A tuple with control data in the format 
                                                   format (rot1, trans, rot2) with units (degrees, meters, degrees)
    Returns:
        prob [float]: Probability p(x'|x, u)
    """

    # calculate control values
    norm_delta_rot_1, delta_trans, norm_delta_rot_2 = compute_control(cur_pose, prev_pose)

    norm_control_rot_1 = mapper.normalize_angle(u[0])
    norm_control_rot_2 = mapper.normalize_angle(u[2])
    
    # calculate probability that the robot is in a particular orientation
    prob_rot_1 = loc.gaussian(norm_delta_rot_1, norm_control_rot_1, loc.odom_rot_sigma)
    prob_trans = loc.gaussian(delta_trans, u[1], loc.odom_trans_sigma)
    prob_rot_2 = loc.gaussian(norm_delta_rot_2, norm_control_rot_2, loc.odom_rot_sigma)
    
    # combine probabilities
    prob = prob_rot_1 * prob_trans * prob_rot_2
    
    return prob

Prediction Step

The prediction step will loop through all combinations of x, y, and a (angle). For each combination, it will calculate the belief at that position and orientation. There are 1944 possible states, so if I have to go through all previous and current states, it would take 1944 x 1944 = 3779136 iterations of computation, which is extremely in efficient. Here, I implemented an optimization as specified by the lab manual. If a state has a probability less than 0.0001, it doesn’t contribute a lot to the belief, so it can be skipped. This means that the total belief will no longer sum to one, which is why we need the normalization steps in the previous two functions. For the states with a probability greater than 0.0001, I loop through all combinations of x, y, and a again. Now that I have values for prev_pose and curr_pos, I created an odometry model using odom_motion_model(), calculated belief using loc.bel, and used them to update probabilities in loc.bel_bar.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
def prediction_step(cur_odom, prev_odom):
    """ Prediction step of the Bayes Filter.
    Update the probabilities in loc.bel_bar based on loc.bel from the previous time step and the odometry motion model.

    Args:
        cur_odom  ([Pose]): Current Pose
        prev_odom ([Pose]): Previous Pose
    """

    # loop through all combinations of (x, y, a)
    for x in range(mapper.MAX_CELLS_X):
        for y in range(mapper.MAX_CELLS_Y):
            for a in range(mapper.MAX_CELLS_A):
                
                # if the belief is less than 1e-4, it is highly unlikely that the robot is in that cell
                if loc.bel[x, y, a] >= 0.0001:
                    
                    # loop through all combinations of (x, y, a)
                    for x2 in range(mapper.MAX_CELLS_X):
                        for y2 in range(mapper.MAX_CELLS_Y):
                            for a2 in range(mapper.MAX_CELLS_A):
                                
                                # compare all plausible prev_poses with all curr_poses
                                prev_pose = mapper.from_map(x, y, a)
                                curr_pose = mapper.from_map(x2, y2, a2)
                                # calculate probability
                                prob = odom_motion_model(curr_pose, prev_pose, u)
                                # calculate belief of prev_pose
                                bel = loc.bel[x, y, a]
                                # adjust current based on previous
                                loc.bel_bar[x2, y2, a2] += (prob * bel)

Sensor Model

This function calculates the probability the actual measurement with respect to the expected measurement. Every scanning rotation, the robot captures a certain amount of sensor readings, represented by mapper.OBS_PER_CELL (observations per cell). I did not change the default value. The obs (observation) array parameter holds the actual measurements. loc.obs_range_data holds the expected measurements. I use loc.gaussian() function to calculate the probability.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
def sensor_model(obs):
    """ This is the equivalent of p(z|x).

    Args:
        obs ([ndarray]): A 1D array consisting of the true observations for a specific robot pose in the map 

    Returns:
        [ndarray]: Returns a 1D array of size 18 (=loc.OBS_PER_CELL) with the likelihoods of each individual sensor measurement
    """

    prob_array = np.zeros(mapper.OBS_PER_CELL)
    for i in range(mapper.OBS_PER_CELL):
        prob_array[i] = loc.gaussian(loc.obs_range_data[i][0], obs[i], loc.sensor_sigma)
        
    return prob_array

Update Step

When the robot receives a new measurement, the update_step() function updates the beliefs.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
def update_step():
    """ Update step of the Bayes Filter.
    Update the probabilities in loc.bel based on loc.bel_bar and the sensor model.
    """

    # loop through cells
    for x in range(mapper.MAX_CELLS_X):
        for y in range(mapper.MAX_CELLS_Y):
            for a in range(mapper.MAX_CELLS_A):
                # create sensor model
                sensorModel = np.prod(sensor_model(mapper.get_views(x, y, a)))
                # update beliefs for each cell
                loc.bel[x][y][a] = sensorModel * loc.bel_bar[x][y][a]
    # normalization step
    loc.bel = np.true_divide(bel ,np.sum(bel))

Include the most probable state after each iteration of the bayes filter along with its probability and compare it with the ground truth pose. Write down your inference of when it works and when it doesn’t.

Results

Here is the video of the best localization results (along the entire trajectory):

The plot below shows the most probable state after each iteration of the Bayes filter. The green line is the robot’s actual position. The blue line is the Bayes filter predicted position. The red line is the odometry data. I am satisfied that the Bayes filter follows the actual position of the robot pretty well. The estimate is particularly accurate when the robot moves in a relatively straight line across multiple points. When the robots turns, the Bayes filter deviates from the actual a bit, but is returns to a good prediction soon after.

(0,0)

Here are the probabilities of the most probable states:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
----------------- 0 -----------------
2025-04-15 19:52:25,118 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:52:25,123 | INFO     |: GT index         : (6, 3, 7)
2025-04-15 19:52:25,124 | INFO     |: Prior Bel index  : (np.int64(3), np.int64(4), np.int64(8)) with prob = 0.8873386
2025-04-15 19:52:25,125 | INFO     |: POS ERROR        : (0.892, -0.086, -28.675)
2025-04-15 19:52:25,125 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:52:28,164 | INFO     |: ---------- UPDATE STATS -----------
2025-04-15 19:52:28,166 | INFO     |: GT index      : (6, 3, 7)
2025-04-15 19:52:28,166 | INFO     |: Bel index     : (np.int64(6), np.int64(4), np.int64(6)) with prob = 1.0
2025-04-15 19:52:28,166 | INFO     |: Bel_bar prob at index = 0.07176862050238098
2025-04-15 19:52:28,167 | INFO     |: GT            : (0.282, -0.086, 320.561)
2025-04-15 19:52:28,167 | INFO     |: Belief        : (0.305, 0.000, -50.000)
2025-04-15 19:52:28,167 | INFO     |: POS ERROR     : (-0.023, -0.086, 370.561)
2025-04-15 19:52:28,168 | INFO     |: ---------- UPDATE STATS -----------
-------------------------------------


----------------- 1 -----------------
2025-04-15 19:52:30,222 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:52:30,226 | INFO     |: GT index         : (7, 2, 5)
2025-04-15 19:52:30,226 | INFO     |: Prior Bel index  : (np.int64(3), np.int64(4), np.int64(8)) with prob = 0.8907603
2025-04-15 19:52:30,226 | INFO     |: POS ERROR        : (1.108, -0.499, 307.643)
2025-04-15 19:52:30,227 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:52:33,255 | INFO     |: ---------- UPDATE STATS -----------
2025-04-15 19:52:33,257 | INFO     |: GT index      : (7, 2, 5)
2025-04-15 19:52:33,258 | INFO     |: Bel index     : (np.int64(6), np.int64(2), np.int64(5)) with prob = 1.0
2025-04-15 19:52:33,258 | INFO     |: Bel_bar prob at index = 0.004017303414470731
2025-04-15 19:52:33,258 | INFO     |: GT            : (0.510, -0.521, 657.643)
2025-04-15 19:52:33,258 | INFO     |: Belief        : (0.305, -0.610, -70.000)
2025-04-15 19:52:33,259 | INFO     |: POS ERROR     : (0.206, 0.088, 727.643)
2025-04-15 19:52:33,259 | INFO     |: ---------- UPDATE STATS -----------
-------------------------------------


----------------- 2 -----------------
2025-04-15 19:52:34,304 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:52:34,308 | INFO     |: GT index         : (7, 2, 4)
2025-04-15 19:52:34,309 | INFO     |: Prior Bel index  : (np.int64(3), np.int64(4), np.int64(8)) with prob = 0.8923958
2025-04-15 19:52:34,309 | INFO     |: POS ERROR        : (1.120, -0.521, 646.251)
2025-04-15 19:52:34,309 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:52:37,330 | INFO     |: ---------- UPDATE STATS -----------
2025-04-15 19:52:37,347 | INFO     |: GT index      : (7, 2, 4)
2025-04-15 19:52:37,348 | INFO     |: Bel index     : (np.int64(6), np.int64(2), np.int64(4)) with prob = 1.0
2025-04-15 19:52:37,348 | INFO     |: Bel_bar prob at index = 0.0005326784747083861
2025-04-15 19:52:37,349 | INFO     |: GT            : (0.510, -0.521, 995.105)
2025-04-15 19:52:37,349 | INFO     |: Belief        : (0.305, -0.610, -90.000)
2025-04-15 19:52:37,349 | INFO     |: POS ERROR     : (0.206, 0.088, 1085.105)
2025-04-15 19:52:37,349 | INFO     |: ---------- UPDATE STATS -----------
-------------------------------------


----------------- 3 -----------------
2025-04-15 19:52:38,406 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:52:38,410 | INFO     |: GT index         : (7, 0, 4)
2025-04-15 19:52:38,410 | INFO     |: Prior Bel index  : (np.int64(3), np.int64(4), np.int64(8)) with prob = 0.8927931
2025-04-15 19:52:38,411 | INFO     |: POS ERROR        : (1.156, -0.920, 1005.105)
2025-04-15 19:52:38,411 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:52:41,447 | INFO     |: ---------- UPDATE STATS -----------
2025-04-15 19:52:41,461 | INFO     |: GT index      : (7, 0, 4)
2025-04-15 19:52:41,462 | INFO     |: Bel index     : (np.int64(7), np.int64(1), np.int64(4)) with prob = 1.0
2025-04-15 19:52:41,462 | INFO     |: Bel_bar prob at index = 0.0005239904197966118
2025-04-15 19:52:41,462 | INFO     |: GT            : (0.546, -0.920, 1355.105)
2025-04-15 19:52:41,462 | INFO     |: Belief        : (0.610, -0.914, -90.000)
2025-04-15 19:52:41,463 | INFO     |: POS ERROR     : (-0.064, -0.005, 1445.105)
2025-04-15 19:52:41,463 | INFO     |: ---------- UPDATE STATS -----------
-------------------------------------


----------------- 4 -----------------
2025-04-15 19:52:44,538 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:52:44,543 | INFO     |: GT index         : (8, 0, 8)
2025-04-15 19:52:44,543 | INFO     |: Prior Bel index  : (np.int64(3), np.int64(4), np.int64(8)) with prob = 0.8927931
2025-04-15 19:52:44,544 | INFO     |: POS ERROR        : (1.417, -1.056, 1449.615)
2025-04-15 19:52:44,544 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:52:47,568 | INFO     |: ---------- UPDATE STATS -----------
2025-04-15 19:52:47,585 | INFO     |: GT index      : (8, 0, 9)
2025-04-15 19:52:47,585 | INFO     |: Bel index     : (np.int64(8), np.int64(1), np.int64(9)) with prob = 1.0
2025-04-15 19:52:47,585 | INFO     |: Bel_bar prob at index = 0.058633481429606865
2025-04-15 19:52:47,585 | INFO     |: GT            : (0.807, -1.056, 1801.048)
2025-04-15 19:52:47,586 | INFO     |: Belief        : (0.914, -0.914, 10.000)
2025-04-15 19:52:47,586 | INFO     |: POS ERROR     : (-0.107, -0.142, 1791.048)
2025-04-15 19:52:47,586 | INFO     |: ---------- UPDATE STATS -----------
-------------------------------------


----------------- 5 -----------------
2025-04-15 19:52:53,649 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:52:53,653 | INFO     |: GT index         : (11, 1, 11)
2025-04-15 19:52:53,653 | INFO     |: Prior Bel index  : (np.int64(3), np.int64(4), np.int64(8)) with prob = 0.8927931
2025-04-15 19:52:53,653 | INFO     |: POS ERROR        : (2.191, -0.885, 1860.015)
2025-04-15 19:52:53,654 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:52:56,663 | INFO     |: ---------- UPDATE STATS -----------
2025-04-15 19:52:56,665 | INFO     |: GT index      : (11, 1, 11)
2025-04-15 19:52:56,665 | INFO     |: Bel index     : (np.int64(10), np.int64(1), np.int64(11)) with prob = 1.0
2025-04-15 19:52:56,665 | INFO     |: Bel_bar prob at index = 0.0005315483556178976
2025-04-15 19:52:56,666 | INFO     |: GT            : (1.582, -0.885, 2210.015)
2025-04-15 19:52:56,666 | INFO     |: Belief        : (1.524, -0.914, 50.000)
2025-04-15 19:52:56,666 | INFO     |: POS ERROR     : (0.058, 0.030, 2160.015)
2025-04-15 19:52:56,667 | INFO     |: ---------- UPDATE STATS -----------
-------------------------------------


----------------- 6 -----------------
2025-04-15 19:52:58,737 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:52:58,742 | INFO     |: GT index         : (11, 2, 12)
2025-04-15 19:52:58,742 | INFO     |: Prior Bel index  : (np.int64(3), np.int64(4), np.int64(8)) with prob = 0.8927931
2025-04-15 19:52:58,742 | INFO     |: POS ERROR        : (2.269, -0.499, 2248.669)
2025-04-15 19:52:58,743 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:53:01,759 | INFO     |: ---------- UPDATE STATS -----------
2025-04-15 19:53:01,777 | INFO     |: GT index      : (11, 2, 12)
2025-04-15 19:53:01,778 | INFO     |: Bel index     : (np.int64(11), np.int64(3), np.int64(13)) with prob = 1.0
2025-04-15 19:53:01,778 | INFO     |: Bel_bar prob at index = 0.0009055816036354551
2025-04-15 19:53:01,778 | INFO     |: GT            : (1.660, -0.492, 2598.669)
2025-04-15 19:53:01,778 | INFO     |: Belief        : (1.829, -0.305, 90.000)
2025-04-15 19:53:01,779 | INFO     |: POS ERROR     : (-0.168, -0.188, 2508.669)
2025-04-15 19:53:01,779 | INFO     |: ---------- UPDATE STATS -----------
-------------------------------------


----------------- 7 -----------------
2025-04-15 19:53:03,842 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:53:03,847 | INFO     |: GT index         : (11, 3, 13)
2025-04-15 19:53:03,847 | INFO     |: Prior Bel index  : (np.int64(3), np.int64(4), np.int64(8)) with prob = 0.8927931
2025-04-15 19:53:03,848 | INFO     |: POS ERROR        : (2.341, -0.139, 2614.113)
2025-04-15 19:53:03,848 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:53:06,865 | INFO     |: ---------- UPDATE STATS -----------
2025-04-15 19:53:06,880 | INFO     |: GT index      : (11, 3, 13)
2025-04-15 19:53:06,880 | INFO     |: Bel index     : (np.int64(11), np.int64(3), np.int64(13)) with prob = 1.0
2025-04-15 19:53:06,881 | INFO     |: Bel_bar prob at index = 0.0010118602503362897
2025-04-15 19:53:06,881 | INFO     |: GT            : (1.731, -0.139, 2964.304)
2025-04-15 19:53:06,881 | INFO     |: Belief        : (1.829, -0.305, 90.000)
2025-04-15 19:53:06,881 | INFO     |: POS ERROR     : (-0.098, 0.165, 2874.304)
2025-04-15 19:53:06,882 | INFO     |: ---------- UPDATE STATS -----------
-------------------------------------


----------------- 8 -----------------
2025-04-15 19:53:09,948 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:53:09,953 | INFO     |: GT index         : (11, 5, 14)
2025-04-15 19:53:09,954 | INFO     |: Prior Bel index  : (np.int64(3), np.int64(4), np.int64(8)) with prob = 0.8927931
2025-04-15 19:53:09,954 | INFO     |: POS ERROR        : (2.341, 0.352, 2996.081)
2025-04-15 19:53:09,954 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:53:12,976 | INFO     |: ---------- UPDATE STATS -----------
2025-04-15 19:53:12,989 | INFO     |: GT index      : (11, 5, 14)
2025-04-15 19:53:12,989 | INFO     |: Bel index     : (np.int64(11), np.int64(4), np.int64(13)) with prob = 0.9862143
2025-04-15 19:53:12,990 | INFO     |: Bel_bar prob at index = 0.000671838293010286
2025-04-15 19:53:12,990 | INFO     |: GT            : (1.731, 0.352, 3346.940)
2025-04-15 19:53:12,990 | INFO     |: Belief        : (1.829, 0.000, 90.000)
2025-04-15 19:53:12,991 | INFO     |: POS ERROR     : (-0.098, 0.352, 3256.940)
2025-04-15 19:53:12,991 | INFO     |: ---------- UPDATE STATS -----------
-------------------------------------


----------------- 9 -----------------
2025-04-15 19:53:16,055 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:53:16,065 | INFO     |: GT index         : (11, 6, 16)
2025-04-15 19:53:16,066 | INFO     |: Prior Bel index  : (np.int64(3), np.int64(4), np.int64(8)) with prob = 0.8927931
2025-04-15 19:53:16,066 | INFO     |: POS ERROR        : (2.342, 0.677, 3396.088)
2025-04-15 19:53:16,066 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:53:19,087 | INFO     |: ---------- UPDATE STATS -----------
2025-04-15 19:53:19,100 | INFO     |: GT index      : (11, 6, 16)
2025-04-15 19:53:19,100 | INFO     |: Bel index     : (np.int64(10), np.int64(6), np.int64(16)) with prob = 1.0
2025-04-15 19:53:19,100 | INFO     |: Bel_bar prob at index = 0.03397300064550387
2025-04-15 19:53:19,101 | INFO     |: GT            : (1.732, 0.677, 3746.088)
2025-04-15 19:53:19,101 | INFO     |: Belief        : (1.524, 0.610, 150.000)
2025-04-15 19:53:19,101 | INFO     |: POS ERROR     : (0.208, 0.067, 3596.088)
2025-04-15 19:53:19,101 | INFO     |: ---------- UPDATE STATS -----------
-------------------------------------


----------------- 10 -----------------
2025-04-15 19:53:21,162 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:53:21,165 | INFO     |: GT index         : (10, 7, 16)
2025-04-15 19:53:21,166 | INFO     |: Prior Bel index  : (np.int64(3), np.int64(4), np.int64(8)) with prob = 0.8927931
2025-04-15 19:53:21,166 | INFO     |: POS ERROR        : (1.927, 0.956, 3767.168)
2025-04-15 19:53:21,166 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:53:24,214 | INFO     |: ---------- UPDATE STATS -----------
2025-04-15 19:53:24,225 | INFO     |: GT index      : (10, 7, 16)
2025-04-15 19:53:24,225 | INFO     |: Bel index     : (np.int64(10), np.int64(7), np.int64(16)) with prob = 1.0
2025-04-15 19:53:24,225 | INFO     |: Bel_bar prob at index = 0.007832694782976893
2025-04-15 19:53:24,226 | INFO     |: GT            : (1.317, 0.956, 4117.359)
2025-04-15 19:53:24,226 | INFO     |: Belief        : (1.524, 0.914, 150.000)
2025-04-15 19:53:24,226 | INFO     |: POS ERROR     : (-0.207, 0.041, 3967.359)
2025-04-15 19:53:24,226 | INFO     |: ---------- UPDATE STATS -----------
-------------------------------------


----------------- 11 -----------------
2025-04-15 19:53:27,287 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:53:27,292 | INFO     |: GT index         : (7, 6, 3)
2025-04-15 19:53:27,292 | INFO     |: Prior Bel index  : (np.int64(3), np.int64(4), np.int64(8)) with prob = 0.8927931
2025-04-15 19:53:27,293 | INFO     |: POS ERROR        : (1.047, 0.863, 4220.160)
2025-04-15 19:53:27,293 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:53:30,327 | INFO     |: ---------- UPDATE STATS -----------
2025-04-15 19:53:30,344 | INFO     |: GT index      : (7, 6, 3)
2025-04-15 19:53:30,344 | INFO     |: Bel index     : (np.int64(7), np.int64(7), np.int64(3)) with prob = 1.0
2025-04-15 19:53:30,344 | INFO     |: Bel_bar prob at index = 0.019228419953413477
2025-04-15 19:53:30,345 | INFO     |: GT            : (0.437, 0.863, 4573.597)
2025-04-15 19:53:30,345 | INFO     |: Belief        : (0.610, 0.914, -110.000)
2025-04-15 19:53:30,345 | INFO     |: POS ERROR     : (-0.172, -0.051, 4683.597)
2025-04-15 19:53:30,345 | INFO     |: ---------- UPDATE STATS -----------
-------------------------------------


----------------- 12 -----------------
2025-04-15 19:53:32,390 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:53:32,394 | INFO     |: GT index         : (6, 4, 5)
2025-04-15 19:53:32,394 | INFO     |: Prior Bel index  : (np.int64(3), np.int64(4), np.int64(8)) with prob = 0.8927931
2025-04-15 19:53:32,394 | INFO     |: POS ERROR        : (0.863, 0.240, 4627.916)
2025-04-15 19:53:32,395 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:53:35,429 | INFO     |: ---------- UPDATE STATS -----------
2025-04-15 19:53:35,442 | INFO     |: GT index      : (6, 4, 5)
2025-04-15 19:53:35,442 | INFO     |: Bel index     : (np.int64(6), np.int64(5), np.int64(5)) with prob = 1.0
2025-04-15 19:53:35,442 | INFO     |: Bel_bar prob at index = 0.002026300929307725
2025-04-15 19:53:35,443 | INFO     |: GT            : (0.254, 0.240, 4977.916)
2025-04-15 19:53:35,443 | INFO     |: Belief        : (0.305, 0.305, -70.000)
2025-04-15 19:53:35,443 | INFO     |: POS ERROR     : (-0.051, -0.065, 5047.916)
2025-04-15 19:53:35,443 | INFO     |: ---------- UPDATE STATS -----------
-------------------------------------


----------------- 13 -----------------
2025-04-15 19:53:37,501 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:53:37,505 | INFO     |: GT index         : (6, 3, 2)
2025-04-15 19:53:37,506 | INFO     |: Prior Bel index  : (np.int64(7), np.int64(6), np.int64(2)) with prob = 1.2009798
2025-04-15 19:53:37,506 | INFO     |: POS ERROR        : (-0.609, -0.662, 5039.172)
2025-04-15 19:53:37,506 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:53:40,544 | INFO     |: ---------- UPDATE STATS -----------
2025-04-15 19:53:40,558 | INFO     |: GT index      : (5, 3, 2)
2025-04-15 19:53:40,558 | INFO     |: Bel index     : (np.int64(5), np.int64(3), np.int64(2)) with prob = 1.0
2025-04-15 19:53:40,559 | INFO     |: Bel_bar prob at index = 0.8633640790183422
2025-04-15 19:53:40,559 | INFO     |: GT            : (-0.003, -0.058, 5269.172)
2025-04-15 19:53:40,559 | INFO     |: Belief        : (0.000, -0.305, -130.000)
2025-04-15 19:53:40,559 | INFO     |: POS ERROR     : (-0.003, 0.247, 5399.172)
2025-04-15 19:53:40,560 | INFO     |: ---------- UPDATE STATS -----------
-------------------------------------


----------------- 14 -----------------
2025-04-15 19:53:43,616 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:53:43,620 | INFO     |: GT index         : (4, 3, 1)
2025-04-15 19:53:43,620 | INFO     |: Prior Bel index  : (np.int64(7), np.int64(5), np.int64(0)) with prob = 1.2228449
2025-04-15 19:53:43,620 | INFO     |: POS ERROR        : (-0.981, -0.501, 5415.868)
2025-04-15 19:53:43,621 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:53:46,660 | INFO     |: ---------- UPDATE STATS -----------
2025-04-15 19:53:46,665 | INFO     |: GT index      : (4, 3, 1)
2025-04-15 19:53:46,665 | INFO     |: Bel index     : (np.int64(4), np.int64(3), np.int64(1)) with prob = 1.0
2025-04-15 19:53:46,665 | INFO     |: Bel_bar prob at index = 0.6179262018920699
2025-04-15 19:53:46,665 | INFO     |: GT            : (-0.372, -0.196, 5606.154)
2025-04-15 19:53:46,666 | INFO     |: Belief        : (-0.305, -0.305, -150.000)
2025-04-15 19:53:46,666 | INFO     |: POS ERROR     : (-0.067, 0.109, 5756.154)
2025-04-15 19:53:46,666 | INFO     |: ---------- UPDATE STATS -----------
-------------------------------------


----------------- 15 -----------------
2025-04-15 19:53:49,727 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:53:49,731 | INFO     |: GT index         : (3, 3, 0)
2025-04-15 19:53:49,731 | INFO     |: Prior Bel index  : (np.int64(7), np.int64(5), np.int64(0)) with prob = 1.2228449
2025-04-15 19:53:49,732 | INFO     |: POS ERROR        : (-1.374, -0.484, 5753.136)
2025-04-15 19:53:49,732 | INFO     |: ---------- PREDICTION STATS -----------
2025-04-15 19:53:52,783 | INFO     |: ---------- UPDATE STATS -----------
2025-04-15 19:53:52,785 | INFO     |: GT index      : (3, 3, 0)
2025-04-15 19:53:52,785 | INFO     |: Bel index     : (np.int64(2), np.int64(3), np.int64(0)) with prob = 0.9228678
2025-04-15 19:53:52,785 | INFO     |: Bel_bar prob at index = 0.7954395666248766
2025-04-15 19:53:52,785 | INFO     |: GT            : (-0.765, -0.179, 5943.136)
2025-04-15 19:53:52,786 | INFO     |: Belief        : (-0.914, -0.305, -170.000)
2025-04-15 19:53:52,786 | INFO     |: POS ERROR     : (0.150, 0.126, 6113.136)
2025-04-15 19:53:52,786 | INFO     |: ---------- UPDATE STATS -----------
-------------------------------------

References

This post is licensed under CC BY 4.0 by the author.