ros2 / ros2cli

ROS 2 command line interface tools
Apache License 2.0
173 stars 159 forks source link

`ros2 action send_goal` shows incorrect goal UUID #857

Open alsora opened 11 months ago

alsora commented 11 months ago

Bug report

Required Info:

Steps to reproduce issue

Send a ROS 2 action goal from command line to an action server running in a C++ application. The ROS 2 CLI prints a goal id when the goal is accepted. Have the action server print the UUID of the goal using

rclcpp_action::to_string(goal_handle->get_goal_id())

Expected behavior

The UUID printed by the C++ action server and the UUID printed by the Python action client should match.

Actual behavior

The UUIDs are very similar but they do not match. For example, the CLI shows:

Goal accepted with ID: b10a7c4d52564eafa06962e25eefe297

while the C++ app shows

b1a7c4d52564eafa06962e25eefe297

Note how the two string representations are very similar, but different.

The same applies to many other goals. It looks like there are always a couple of extra/missing zeros in the Python representation.

clalancette commented 11 months ago

Can you please check with Rolling or Humble? I can't seem to make it happen with Rolling, but I may just be getting "lucky" and not generating UUIDs with 0s at the right spots.

Ryanf55 commented 6 months ago

Trying to print the UUID with uuid_unparse results in a different value than what is reported in the CLI on humble. Would you like me to provide a minimum reproducible example?

fujitatomoya commented 6 months ago

@Ryanf55 yes please. for the information, does this also happen with rolling?

Ryanf55 commented 6 months ago

The code it's in is tied to humble. I'll extract a minimum example out and report test results on humble and rolling.