processing_utils
ExponentialAverageFilter
Bases: Filter
This class uses an exponential average of the form y_n = alpha * x_n + (1 - alpha) * y_{n - 1}. This is an IIR filter.
Source code in omnigibson/utils/processing_utils.py
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 |
|
__init__(obs_dim, alpha=0.9)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
obs_dim |
int
|
The dimension of the points to filter. |
required |
alpha |
float
|
The relative weighting of new samples relative to older samples |
0.9
|
Source code in omnigibson/utils/processing_utils.py
estimate(observation)
Do an online hold for state estimation given a recent observation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
observation |
n - array
|
New observation to hold internal estimate of state. |
required |
Returns:
Type | Description |
---|---|
n - array
|
New estimate of state. |
Source code in omnigibson/utils/processing_utils.py
Filter
Bases: Serializable
A base class for filtering a noisy data stream in an online fashion.
Source code in omnigibson/utils/processing_utils.py
estimate(observation)
Takes an observation and returns a de-noised estimate.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
observation |
n - array
|
A current observation. |
required |
Returns:
Type | Description |
---|---|
n - array
|
De-noised estimate. |
MovingAverageFilter
Bases: Filter
This class uses a moving average to de-noise a noisy data stream in an online fashion. This is a FIR filter.
Source code in omnigibson/utils/processing_utils.py
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 |
|
__init__(obs_dim, filter_width)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
obs_dim |
int
|
The dimension of the points to filter. |
required |
filter_width |
int
|
The number of past samples to take the moving average over. |
required |
Source code in omnigibson/utils/processing_utils.py
estimate(observation)
Do an online hold for state estimation given a recent observation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
observation |
n - array
|
New observation to hold internal estimate of state. |
required |
Returns:
Type | Description |
---|---|
n - array
|
New estimate of state. |
Source code in omnigibson/utils/processing_utils.py
Subsampler
A base class for subsampling a data stream in an online fashion.
Source code in omnigibson/utils/processing_utils.py
subsample(observation)
Takes an observation and returns the observation, or None, which corresponds to deleting the observation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
observation |
n - array
|
A current observation. |
required |
Returns:
Type | Description |
---|---|
None or n - array
|
No observation if subsampled, otherwise the observation |
Source code in omnigibson/utils/processing_utils.py
UniformSubsampler
Bases: Subsampler
A class for subsampling a data stream uniformly in time in an online fashion.
Source code in omnigibson/utils/processing_utils.py
__init__(T)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
T |
int
|
Pick one every T observations. |
required |
subsample(observation)
Returns an observation once every T observations, None otherwise.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
observation |
n - array
|
A current observation. |
required |
Returns:
Type | Description |
---|---|
None or n - array
|
The observation, or None. |