SampleHistoryVectorizer
Keeps the last max_samples samples of one numeric input and outputs them joined in one vector, oldest first, each time a sample arrives.
Processing
- Each sample is a vector of K values; the output is [sample(t-n+1), ..., sample(t-1), sample(t)] with n = 1, 2, ... up to max_samples, so its length is K x n. When max_samples samples are kept, the oldest one is dropped (ring buffer).
- Use it to draw a trajectory from poses that arrive one by one, or to feed a moving window of one signal to MaxMinMeanforArray.
- reset: while the last value received is not 0, and in a frame where a non-zero value arrived (also a short pulse), the kept samples and the current sample are dropped and nothing is output. After the reset, the output grows again one sample at a time.
Data format
- Supported inputs: integer and float vectors (Integer8/16/32/64, UnsignedInteger8/16/32/64, Float32, Float64). The output takes the type, type name and unit of the input at the first sample.
- K is set by the first sample and must not change; a change of length or type stops the component with an error.
Notes
- Samples are joined over time on one input; to join several inputs of the same time, use the RTMaps Vectorizer.
Properties
| Name | Default | Description |
|---|---|---|
max_samples | 10 | Number of samples kept (1 or more). |
output_timestamp | newest | Timestamp of the output: newest = the sample just received, oldest = the oldest sample in the output (first group). Options: newest, oldest. |
Outputs
| Name | Description |
|---|---|
output | Last n samples (n <= max_samples) joined oldest first; length K x n; same type as the input. Type: AnyType |
Inputs
| Name | Description |
|---|---|
input | Signal to keep (integer or float vector of fixed length K). Type: Numbers |
reset | Reset signal (optional, UnsignedInteger8): non-zero drops the kept samples; nothing is output while it is non-zero. Type: UInt8 |
RTMaps Toolkits Documentation