-
Notifications
You must be signed in to change notification settings - Fork 412
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
Fix the GoalUUID to_string representation #1999
Conversation
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 think this PR is reasonable to me, but format should be consistent in language frontend libraries for debugging use case? (probably goal id is likely to be used with grep
)
I'm not necessarily opposed to changing it, but I would like to know the motivation (other than just conforming to the RFC). There are possible backwards-compatibility things to consider here. |
@fujitatomoya I agree, we should use a consistent format across client libraries. Unfortunately, rclpy currently doesn't format goal IDs well either. For example, the rclpy action server prints them as arrays of integers:
So it would be good to start standardizing this output. @clalancette The issues with the current string representation aren't just aesthetic or pedantic. Omitting the leading zero in a byte is actually ambiguous. For example, the two UUIDs |
@fujitatomoya @clalancette Are there any further concerns about this or action required to get this merged? |
Just FYI, I see https://github.com/ros2/geometry2 uses this method, but all issued for debug print. |
Signed-off-by: Nathan Wiebe Neufeldt <nwiebeneufeldt@clearpath.ai>
Signed-off-by: Nathan Wiebe Neufeldt <nwiebeneufeldt@clearpath.ai>
Signed-off-by: Chris Lalancette <clalancette@gmail.com>
d7f5589
to
8b9baed
Compare
I've rebased this onto the latest, and I've also done a bit more cleanup in here. In particular, I made the whole thing a little more efficient by using I also did a quick look around the code base and came to the same conclusion that Tomoya did; the only uses seem to be in the tests here and in debug messages in tf2_ros. So I think this is good to go, I'm going to go ahead and approve this and run CI. That said, I did some work on this, so I'd appreciate another look from @fujitatomoya before I go ahead and merge. |
CI is green with this, so going ahead and merging. Thanks for the contribution! |
Changes the string representation of
rclcpp_action::GoalUUID
s to match the canonical format described in RFC 4122. (The current representation doesn't contain hyphens and omits the leading zero in the hex of a byte.)