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.
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
Add received message age metric to topic statistics #1080
Add received message age metric to topic statistics #1080
Changes from all commits
c25a916
fbee7b0
c930563
1cba4b5
faff047
2b90d72
d9186c1
2e3fa8a
0d9ecf4
393a0d3
8cd1361
920c23a
f43f91e
92810d0
b7e674b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
IIUC, this change is because we're assuming that the timestamp in message headers is using system time, right?
What happens if a node is using simulation time (ie. ROS_TIME)?
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.
That is correct. There is also no way to specify a message's time source when we were assuming one would use the std_msgs/Header (I brought this up with @wjwwood and @tfoote during the message review).
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.
Okay, so it sounds like a known limitation of topic statistics for the moment; not compatible with simulation.
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 type in
std_msgs::msg::Header
can be ROS time... Both ROS Time and System time share an epoch, the unix epoch. It's only when you want to use a different Epoch or behavior for the clock that the stamp in header is insufficient, e.g. like steady time or TAI time.So in this situation I don't understand why you cannot use ROS Time...
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.
I guess we could ROS time, and assume the incoming messages are using the same epoch as this node.
At the end of the day we can't know if the time in the header will have the same epoch as the time from this node, right? Since one of them may being use simulation time and the other not.
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.
Simulated time uses the same epoch as system time, at least that's my understanding. If you are simulating time and then set the time to 1 (as in 1 nanosecond) then it's 1 nanosecond after jan 1 1970.
At least that's how I interrpret it:
rclcpp/rclcpp/include/rclcpp/time.hpp
Line 129 in df3c2ff
Perhaps it should be clarified, but I think ROS time and system time should be usable interchangeably.