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

Bug: Incorrect message name conversion to snake case #60

Closed
skoudmar opened this issue Jun 26, 2023 · 4 comments
Closed

Bug: Incorrect message name conversion to snake case #60

skoudmar opened this issue Jun 26, 2023 · 4 comments

Comments

@skoudmar
Copy link
Contributor

Steps to reproduce:

  1. Clone https://github.com/m-dahl/r2r_minimal_node
  2. Create a copy of the Hello.msg message with name AB01CD02.msg and add it to CmakeLists.txt
  3. Try to build the project using colcon build

Actual result:

  • msg_includes.h imports the generated header for the message as ab01bc02.h
  • The generated header is actually ab01_bc02.h
  • The build fails with output:
Generate bindings in '/root/workspace/src/r2r_minimal_node/r2r_minimal_node/target/colcon/build/r2r_msg_gen-eb7851d00b74d025/out/046208b23c10c063ee7da6e5fbf84dea4c8c3fc0d722709ee6bbbfdd3a5a1750'
  /root/workspace/src/r2r_minimal_node/r2r_minimal_node/target/colcon/build/r2r_msg_gen-eb7851d00b74d025/out/046208b23c10c063ee7da6e5fbf84dea4c8c3fc0d722709ee6bbbfdd3a5a1750/msg_includes.h:15:10: fatal error: 'r2r_minimal_node_msgs/msg/ab01cd02.h' file not found
  thread 'main' panicked at 'Unable to generate bindings: ClangDiagnostic("/root/workspace/src/r2r_minimal_node/r2r_minimal_node/target/colcon/build/r2r_msg_gen-eb7851d00b74d025/out/046208b23c10c063ee7da6e5fbf84dea4c8c3fc0d722709ee6bbbfdd3a5a1750/msg_includes.h:15:10: fatal error: 'r2r_minimal_node_msgs/msg/ab01cd02.h' file not found\n")', /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/r2r_msg_gen-0.3.8/build.rs:171:39
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
gmake[2]: *** [CMakeFiles/cargo_target.dir/build.make:70: CMakeFiles/cargo_target] Error 101
gmake[1]: *** [CMakeFiles/Makefile2:164: CMakeFiles/cargo_target.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

Expected result:

  • The msg_includes.h imports correctly the generated header
  • The build is successful
@m-dahl
Copy link
Collaborator

m-dahl commented Jun 26, 2023

Good catch and thanks for the detailed report. Working on this in #61

@m-dahl
Copy link
Collaborator

m-dahl commented Jun 26, 2023

I just merged a fix. Can I ask you try the master branch? If it works for your case (which I am guessing is not actually AB01CD02) I can make a bugfix release shortly.

@skoudmar
Copy link
Contributor Author

Thank you, it is working correctly for me.

@m-dahl
Copy link
Collaborator

m-dahl commented Jun 27, 2023

Thanks for testing. The fix is included in 0.7.5.

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