Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

header_generator.py generated file with wrong file name #34

Closed
TatsukiNishimura opened this issue Dec 3, 2022 · 4 comments
Closed

header_generator.py generated file with wrong file name #34

TatsukiNishimura opened this issue Dec 3, 2022 · 4 comments

Comments

@TatsukiNishimura
Copy link
Contributor

environment

  • Ubuntu 20.04
  • ROS2 foxy
  • mbed OS 6
  • NUCLEO_F767ZI

When I tried to generate Transform.hpp from Transform.msg with header_generator.py,
the generated file name wasTransfor.hpp. Maybe this code is the cause.

lineArr[2] = lineArr[2].rstrip('.msg')

rstrip() removes the trailing characters from the string. In this case, it removes ".msg" from Transform.msg, but it removes all combines of.msg such as m, ms , g and so on. Therefore, not Transform.hpp but Transfor.hpp was generated.

@TatsukiNishimura
Copy link
Contributor Author

I use

lineArr[2] = os.path.splitext(lineArr[2])[0]

instead of original code, and it works.

@takasehideki
Copy link
Member

@TatsukiNishimura san, thank you so much for an important report! I confirmed the issue you suggested and completely agree with your idea.
We are grateful if you send a PR to fix this issue :D

@TatsukiNishimura
Copy link
Contributor Author

I made a PR #35. I would appreciate if you check it.

@takasehideki
Copy link
Member

thanks again!! ❤️

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

No branches or pull requests

2 participants