-
Notifications
You must be signed in to change notification settings - Fork 53
Use builtin_interfaces/Time for TransitionEvent stamp #185
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
base: rolling
Are you sure you want to change the base?
Conversation
Signed-off-by: SuperJappie08 <[email protected]>
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.
as @SuperJappie08 mentions in issue header, this is a breaking change because it changes the topic message type. but until now, timestamp has never been used. that said, we can assume that there are no application that actually relies on this timestamp field.
i see that there could be almost no affection for the user application. but i would like to confirm with other PMC members on this.
|
The only thing I would consider is whether or not we need a timestamp in this message at all? There is the sent and received timestamps for all messages, and usually we only include a timestamp in a message if it is representing data that may have happened in the past and there is an impactful delay in sending the message, or if we think the message will be relayed (and therefore have the sent timestamp overwritten by the second send). |
|
Changing the type to be consistent makes sense to me. I think that this field has a legacy that predates builtin_interfaces/Time when we started with the uint64 nanoseconds representation more broadly. Especially since this field has not been being populated this seems like the right time to update the type and then fill in the implementation with the new type. I agree with William though that I'd bias towards keeping the name so that it's a smaller change. We have the shorthand in Header but I think that the full variable name is valuable without the header context. stamp is somewhat overloaded for a standalone field. |
|
@wjwwood @tfoote thanks for the comments. i now also think having timestamp field is redundant, at least i do not find it useful for the application. @SuperJappie08 what do you think? probably we could just remove this field instead? |
Might be interesting to compare this to some sw-defined fieldbuses, such as OPC-UA. In those systems, the approach is often to have different stamps for different 'aspects' of what happened to a message. So a timestamp for when an event occurred, one for when the message was sent (which is not necessarily always when the event happened, nor would it necessarily be sent by the source of the event) and sometimes even a stamp to record when it was received (which again might not always be when the consumer gets its hands on it). With that in mind I could see a use for this additional |
An application I have/had is to get the exact moment of a transition as a time reference for a measurement that is controlled by a lifecycle node. |
|
Those sound like reasonable use cases for a timestamp in the message (since there's no plan at this time to have a "created" timestamp built-in to the middleware), so leaving it is fine. I just wanted to check if it was needed (since it seems to have gone so long being unused). Also, as I said I'm not too worried about the field name. |
i think this makes sense to me. i was thinking that ...<snip>
publication_sequence_number: 4
publisher_gid:
data: !!binary |
AQ8E9kv3XYQAAAAAAAATAw==
implementation_identifier: rmw_fastrtps_cpp
received_timestamp: 1761111785570276567
reception_sequence_number: null
source_timestamp: 1761111785570084585
---
timestamp: 0
transition:
id: 0
label: ''
start_state:
id: 13
label: activating
goal_state:
id: 3
label: active
---
...<snip>but as @gavanderhoorn mentioned, source and receive timestamp is different when the event takes place. and @SuperJappie08 thanks for iterating with us. i will go ahead to run CI. |
|
Pulls: #185, ros2/rcl#1269, ros2/rclcpp#2967, ros2/rclpy#1528 |
Adds compatibility with ros2/rcl_interfaces#185 Signed-off-by: SuperJappie08 <[email protected]>
Description
Use
builtin_interfaces/Timefor the timestamp inlifecycle_msgs/TransitionEventFixes #184
Is this user-facing behavior change?
Yes, the field name has been changed to be more in line with other uses (
stampinstead oftimestamp).Furthermore, the type has been changed from
uint64tobuiltin_interfaces/Timeto allow it to be more easily used by preexisting tooling.The impact will be minimal, since the
timestampfield is currently not being filled inrcl_lifecycle(ros2/rcl#1019).Did you use Generative AI?
No.
Additional Information