ros2 / rcl_interfaces

A repository for messages and services used by the ROS client libraries
Apache License 2.0
38 stars 42 forks source link

Time/Duration comment on nanosec field should limit it to 1e9, not 10e9 #138

Closed csalzberger closed 2 years ago

csalzberger commented 2 years ago

Bug report

Required Info:

Steps to reproduce issue

The comments on the "nanosec" field for both Time and Duration message definitions says:

# The nanoseconds component, valid in the range [0, 10e9).

The nanoseconds field should be limited to 1e9 (1 billion), non-inclusive, not 10e9 (10 billion). Especially because the data type is uint32, which has a maximum value of about 4.3e9 (4.3 billion).

Expected behavior

Comment should say "1e9".

Actual behavior

Comment says "10e9".

clalancette commented 2 years ago

Thanks for the report.

Would you mind opening a pull request to fix it?

csalzberger commented 2 years ago

Sorry, I've never worked with git before. Just wanted to let you know about the issue.

csalzberger commented 2 years ago

If I'm understanding the linked pull request correctly, you only fixed Duration.msg. The Time.msg file has the same issue.

tfoote commented 2 years ago

Thanks I missed that it was both. I fixed it too.