Create LcmLogSink, a VectorLogSink analog implemented as an lcm interface#358
Open
Brian-Acosta wants to merge 2 commits intomainfrom
Open
Create LcmLogSink, a VectorLogSink analog implemented as an lcm interface#358Brian-Acosta wants to merge 2 commits intomainfrom
Brian-Acosta wants to merge 2 commits intomainfrom
Conversation
yangwill
requested changes
May 3, 2024
Contributor
yangwill
left a comment
There was a problem hiding this comment.
Reviewed 2 of 3 files at r1, all commit messages.
Reviewable status: 2 of 3 files reviewed, 2 unresolved discussions (waiting on @Brian-Acosta)
lcm/lcm_log_sink.cc line 88 at r1 (raw file):
unsigned long timestamp; if (!overwrite_publish_time_with_system_clock_) { timestamp = second_to_timestamp(time_sec.value_or(0.0));
is there a better way to deal with the optional?
lcm/lcm_log_sink.cc line 91 at r1 (raw file):
} else { timestamp = std::chrono::steady_clock::now().time_since_epoch() / std::chrono::microseconds(1);
it feels like there should be a command that's more direct than dividing by microseconds
yangwill
reviewed
May 3, 2024
Contributor
yangwill
left a comment
There was a problem hiding this comment.
Changes look good, just want to confirm that the implementation of the timestamps is as intended
Reviewable status: 2 of 3 files reviewed, 2 unresolved discussions (waiting on @Brian-Acosta)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Usage example:
This is similar to Drake's DrakeLcmLog, but avoids writing to disk for every Publish event, instead deferring until the user calls WriteLog
This change is