|
Brick
|
#include <trajectory.h>
High-efficiency streaming sampler for real-time control loops.
Caches the search index during sequential calls to sample(units::Time t), achieving O(1) step lookup in 100Hz loop cycles.
Public Member Functions | |
| TrajectorySampler (const Trajectory &trajectory) | |
| Constructs a TrajectorySampler bound to a target Trajectory. | |
| void | reset () |
| Resets cached index back to start. | |
| Trajectory::State | sample (units::Time t) |
| Samples state at timestamp t using cached sequential lookup (O(1)). | |
|
inlineexplicit |
Constructs a TrajectorySampler bound to a target Trajectory.
| trajectory | Reference to trajectory to sample. |
|
inline |
Samples state at timestamp t using cached sequential lookup (O(1)).
| t | Target timestamp. |