| 100 | TransformService::~TransformService() = default; |
| 101 | |
| 102 | std::shared_ptr<TransformBuffer> TransformService::transformBuffer(PJ::DatasetId dataset_id) { |
| 103 | auto it = transform_buffers_.find(dataset_id); |
| 104 | if (it != transform_buffers_.end()) { |
| 105 | return it->second; |
| 106 | } |
| 107 | // Default to keeping the full history: ingestFrameTransformsForDataset() |
| 108 | // bulk-loads the entire dataset's TF up front, so a rolling cache window would |
| 109 | // trim every dynamic edge to its last samples and make objects in dynamic |
| 110 | // frames (e.g. a local costmap in `odom`) resolve only near the end of the |
| 111 | // timeline. Live-streaming datasets override this with setLiveCacheWindow() to |
| 112 | // bound memory in step with the ObjectStore retention budget. |
| 113 | auto buf = std::make_shared<TransformBuffer>(TransformBuffer::kKeepAll); |
| 114 | transform_buffers_[dataset_id] = buf; |
| 115 | return buf; |
| 116 | } |
| 117 | |
| 118 | void TransformService::invalidateDataset(PJ::DatasetId dataset_id) { |
| 119 | Q_ASSERT(QThread::currentThread() == thread()); |