From c1f84deae6856981d15557e2ea6e7f9ae534f453 Mon Sep 17 00:00:00 2001 From: Jimmy McElwain Date: Fri, 9 May 2025 07:05:41 -0400 Subject: [PATCH] Add info to duration message and time message comments (#176) Signed-off-by: jimmy-mcelwain (cherry picked from commit 355006bb4f60f99defba0c6c010950ed45e4911c) --- builtin_interfaces/msg/Duration.msg | 7 +++++-- builtin_interfaces/msg/Time.msg | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/builtin_interfaces/msg/Duration.msg b/builtin_interfaces/msg/Duration.msg index e6734af4..dc9e8f5a 100644 --- a/builtin_interfaces/msg/Duration.msg +++ b/builtin_interfaces/msg/Duration.msg @@ -2,8 +2,11 @@ # Messages of this datatype are of ROS Time following this design: # https://design.ros2.org/articles/clock_and_time.html -# Seconds component, range is valid over any possible int32 value. +# The seconds component, valid over all int32 values. int32 sec -# Nanoseconds component in the range of [0, 1e9). +# The nanoseconds component, valid in the range [0, 1e9), to be added to the seconds component. +# e.g. +# The duration -1.7 seconds is represented as {sec: -2, nanosec: 3e8} +# The duration 1.7 seconds is represented as {sec: 1, nanosec: 7e8} uint32 nanosec diff --git a/builtin_interfaces/msg/Time.msg b/builtin_interfaces/msg/Time.msg index dffade0e..03cc83f8 100644 --- a/builtin_interfaces/msg/Time.msg +++ b/builtin_interfaces/msg/Time.msg @@ -4,5 +4,8 @@ # The seconds component, valid over all int32 values. int32 sec -# The nanoseconds component, valid in the range [0, 1e9). +# The nanoseconds component, valid in the range [0, 1e9), to be added to the seconds component. +# e.g. +# The time -1.7 seconds is represented as {sec: -2, nanosec: 3e8} +# The time 1.7 seconds is represented as {sec: 1, nanosec: 7e8} uint32 nanosec