Skip to content
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

Header not found when adding new messages (e.g. visualization_msgs) #44

Open
jhoare opened this issue Sep 14, 2017 · 1 comment
Open

Comments

@jhoare
Copy link

jhoare commented Sep 14, 2017

We were attempting to add visualization_msgs to be generated for C#, but noticed that the generated C# code is expecting Header to be a message within visualization_msgs and not the std_msgs/Header. When visual studio tries to compile the generated C# code, it will fail because no visualization_msgs/Header exsits.

We have found out that this appears to depend on the alphabetical order of the package that the messages are in. If we rename visualization_msgs to avisualization_msgs (or have it start with any letter before s) everything will generate and compile correctly, and if it comes after std_msgs it will experience the error described above.

It looks like we can get everything to build correctly if we modify the messages themselves to have std_msgs/Header instead of Header in the .msg definition. But this is not ideal since it requires us to maintain a different & parallel message definition, and I believe will also cause the md5 of the messages to not match.

@nuclearmistake
Copy link
Collaborator

Issue confirmed. If you use std_msgs/Header, the md5 sum will definitely match correctly (as in https://github.com/uml-robotics/ROS.NET/blob/master/common_msgs/trajectory_msgs/msg/JointTrajectory.msg).

If you're curious, non-literal fields' types' md5 sums are inserted in place of their type names during md5 calculation, allowing explicit or implicit package determination to work).

I hadn't noticed the alphabetical component, but that would definitely explain why sensor_msgs/Images can simply use "Header" with no package name, but trajectory_msgs cannot! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants