-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support dynamic stream metadata #359
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @Pessimistress 🙏 Just a few suggestions on:
- disambiguating between
streamMetadata
VSstreamsMetadata
- updating the
streamsMetadata
refresh logic inXVIZLoaderInterface#getStreamsMetadata()
And a question in metrics-helper.js
about a logical change.
const bufferUpdated = this.streamBuffer.insert(timeslice); | ||
if (bufferUpdated) { | ||
this._bumpDataVersion(); | ||
} | ||
|
||
if (getXVIZConfig().DYNAMIC_STREAM_METADATA && this.streamBuffer.streamCount > oldStreamCount) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the second part of the if statement might be too lax (this.streamBuffer.streamCount > oldStreamCount
). We could have the same number of streams, but different stream names. And in this case, we would fail to update streamsMetadata
.
E.g:
{
`/vehicle/pose`: ...,
`/lidar`: ...
}
{
`/vehicle/speed`: ...,
`/lidar`: ...
}
I can see how doing a stream by stream comparison can be expensive one very update, so maybe we want to check on the exact streamNames
list only periodically (every 1s?). Just an idea to not check this on every update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
streamCount
is an accumulative number since the creation of the buffer, and it only ever increases.
Change List
getStreamMetadata
toXVIZLoaderInterface
DYNAMIC_STREAM_METADATA
config is set (requires Support dynamic stream metadata xviz#493)getStreamMetadata
instead ofgetMetadata().streams