-
Notifications
You must be signed in to change notification settings - Fork 515
Add received message age metric to topic statistics #1080
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
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
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -271,8 +271,8 @@ class Subscription : public SubscriptionBase | |||
|
|
||||
| if (subscription_topic_statistics_) { | ||||
| const auto nanos = std::chrono::time_point_cast<std::chrono::nanoseconds>( | ||||
| std::chrono::steady_clock::now()); | ||||
| const auto time = rclcpp::Time(nanos.time_since_epoch().count(), RCL_STEADY_TIME); | ||||
| std::chrono::system_clock::now()); | ||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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)?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The type in So in this situation I don't understand why you cannot use ROS Time...
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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:
Perhaps it should be clarified, but I think ROS time and system time should be usable interchangeably. |
||||
| const auto time = rclcpp::Time(nanos.time_since_epoch().count()); | ||||
| subscription_topic_statistics_->handle_message(*typed_message, time); | ||||
| } | ||||
| } | ||||
|
|
||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Simple Header message with a timestamp field. | ||
|
|
||
| builtin_interfaces/Time stamp |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Message containing a simple Header field. | ||
|
|
||
| Header header |
Uh oh!
There was an error while loading. Please reload this page.