Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Conversation

@meyerj
Copy link
Contributor

@meyerj meyerj commented Sep 17, 2022

Fix ROSMessage::updateMissingPkgNames() for the case that types with the same message name but different package names are registered.

We used ros_msg_parser in a case where a message was using two different definitions of Header, a custom one with additional fields, but also std_msgs/Header indirectly via a nested geometry_msgs/Vector3Stamped defined as

# This represents a Vector3 with reference coordinate frame and timestamp
Header header
Vector3 vector

so without an explicit package name for Header and Vector3. The previous implementation of ROSMessage::updateMissingPkgNames() then completed this type with the name of the custom package, whose Header message was registered first, and hence parsing failed.

According to the rules defined in http://wiki.ros.org/msg#Fields unqualified types must be resolved in the local package only, with Header as the only exception. I assume that Header is only resolved to std_msgs/Header if no message named Header is defined in the same package.

…pes with the same message name are registered in different packages

... following the rules defined in http://wiki.ros.org/msg#Fields.
@meyerj
Copy link
Contributor Author

meyerj commented Sep 19, 2022

Note: The PlotJuggler plugin for ROS 1 at ros1_introspection/src/ros_message.cpp would also be affected...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant