MCPcopy Create free account
hub / github.com/ComputationalRobotics/XM-code / process_observation

Function process_observation

utils/creatematrix.py:17–31  ·  view source on GitHub ↗
(i, ind_l, landmark, weight)

Source from the content-addressed store, hash-verified

15
16
17def process_observation(i, ind_l, landmark, weight):
18 # # Get indices for observation i
19 # ind_l = ind.indices
20 # ind = ind.data - 1 # Adjust for zero-based indexing
21
22 # Compute weighted landmarks
23 v = landmark * weight[:, None]
24
25 # Calculate blocks to update the sparse matrices
26 Q1_block = v.T @ landmark
27 V1_block = v.sum(axis=0)[:, None]
28 V2_block = v.T
29
30 # Return the computed blocks with their indices
31 return i, Q1_block, V1_block, V2_block, ind_l
32
33
34def process_observation_old(i, observation_index, landmarks, weight):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected