Closed GoesM closed 4 months ago
basically ros2interface
just prints the file contents as it described.
that said, it does not append, prepend or modify the file contents to print. (except comments control)
so it just prints this line, in the case of ros2 interface show geometry_msgs/msg/PoseWithCovarianceStamped
,
if we want to see it like std_msgs/msg/Header
as you suggested, we need to update geometry_msgs/msg/PolygonInstanceStamped.msg
file directly to fix it.
2nd, ros2 interface show std_msgs/Header
should fail (ValueError) since we need to get the interface file based on the interface argument.
if it does not have msg
, srv
between package name and message file name, it cannot get the interface file because there would be the same file name for msg
and srv
under the same package.
std_msgs/Header header should be wrong.
this should not be wrong, and so many other packages have this kind of description without msg
in between.
this is already in the file (either action, srv or msg) description, so it must be msg
file nested here.
that is why, rosidl_adapter
can return the message specification with package name and message, and replace /
with /msg/
to parse it.
and
Thank you for your patient explanation; it's very clear to me. ^_^
However, I have a further question: How can I use the command line to make the rosidl_adapter
work so that I can get the expected feedback even without /msg/
?
How can I use the command line to make the rosidl_adapter work so that I can get the expected feedback even without /msg/?
I am not sure about this question, can you rephrase it? rosidl_adapter
is called to parse the file lines, not to get the interface file.
uh I mean , Which API could let rosidl_adapter
works ? or How can I use ros2 interface show
with this function ?
Which API could let rosidl_adapter works ? or How can I use ros2 interface show with this function ?
ros2 interface show
already uses this rosidl_adapter
once it gets to read the file. (https://github.com/ros2/ros2cli/issues/905#issuecomment-2121476242) But for getting the idl file from ros2 interface show
's type argument, it requires either msg
, srv
or action
in between package name and type file name.
I see. Greatly thank you for your patience.
Bug report
Required Info:
Steps to reproduce issue
do the command like:
Actual behavior
I'm within ros2-humble version , and it return a wrong result
Such situation occurs almost for all types of topics.
Expected behavior
std_msgs/Header header
should be wrong.and the correct result should be
std_msgs/msg/Header
Additional information
If it returns a wrong result, it would be more complex for users to fix wrong message-type into a right one.
And many tools for ros2 are developed according to this API like ros2_automatic_fuzz, it would do like :
and then, failed like:
because the command with the correct type should be like: