Bug: Incorrect message name conversion to snake case
skoudmar opened this issue · 4 comments
skoudmar commented
Steps to reproduce:
- Clone https://github.com/m-dahl/r2r_minimal_node
- Create a copy of the
Hello.msg
message with nameAB01CD02.msg
and add it toCmakeLists.txt
- Try to build the project using
colcon build
Actual result:
msg_includes.h
imports the generated header for the message asab01bc02.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 commented
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 commented
Thank you, it is working correctly for me.
m-dahl commented
Thanks for testing. The fix is included in 0.7.5.