roverd.timestamps
¶
Timestamp denoising / dejittering.
Timestamps which are recorded when a sample is read by the collection computer may suffer from jitter due to scheduling noise and other timing effects. Assuming the sensor clock is locally stable, we can interpolate or smooth the timestamps to reduce this jitter.
This module provides two timestamp models:
smooth
: Each timestamp is jittered by some IID noise.discretize
: Frames arrive at a fixed rate with minor discrepancies, but may be randomly dropped.
roverd.timestamps.discretize
¶
discretize(
x: Float64[ndarray, n], interval: float = 10.0, eps: float = 0.05
) -> Float64[ndarray, n]
Apply timestamp difference discretization.
Corresponds to a "frame drop" timestamp model, where frames arrive at a fixed rate (which may vary slightly over time), but may be randomly dropped with some (small) probability.
Applies to: Lidar
Note
The interval is always assumed to be at least one time step: if the received time difference is less than half a time step, it is rounded up to one time step.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x
|
Float64[ndarray, n]
|
input timestamp array. |
required |
interval
|
float
|
interpolation interval, in seconds. |
10.0
|
eps
|
float
|
only rounds up (assuming a frame drop) if the interframe time
exceeds |
0.05
|
Returns:
Type | Description |
---|---|
Float64[ndarray, n]
|
Discretized timestamp array. |
Source code in format/src/roverd/timestamps.py
roverd.timestamps.identity
¶
roverd.timestamps.smooth
¶
Apply piecewise linear smoothing to system timestamps.
Corresponds to a "independent jitter" timestamp model, where each timestamp is jittered by some IID noise relative to a base sampling frequency which may drift slightly over time.
Applies to: Radar, Camera, IMU
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x
|
Float64[ndarray, n]
|
input timestamp array. |
required |
interval
|
float
|
piecewise linear interpolation interval, in seconds. |
30.0
|
Returns:
Type | Description |
---|---|
Float64[ndarray, n]
|
Smoothed timestamp array. |