Ask Your Question
0

ERROR: package name '***' is illegal and cannot be used in message generation.

asked 2018-08-11 23:24:52 -0600

Lemontree gravatar image

I add a msg file and build the working space. Add it reports such error. If anyone could help me out? Thanks very much!

edit retag flag offensive close merge delete

Comments

1

Please add your CMakeLists.txt and your package.xml to your question. Use the edit button/link for that.

gvdhoorn gravatar imagegvdhoorn ( 2018-08-12 01:07:34 -0600 )edit

What @gvdhoorn wrote, plus - what is the name of your package / msg file?

autonomy gravatar imageautonomy ( 2018-08-13 12:56:12 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-08-12 01:15:04 -0600

gvdhoorn gravatar image

Without more information this is going to be difficult to pinpoint exactly, but the error message that you quote comes from generate_messages(..) in genpy/generator.py (here). It checks whether the package name it's been passed is a legal ROS name using genmsg.is_legal_resource_base_name(..) (this one).

If that function returns false, the name is not legal (ie: contains characters that cannot be used, such as colons or other special characters other than _ and -), the error is printed and message generation is aborted.

You'll have to check whether your package name you used contains any such illegal characters and then change it.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-08-11 23:24:52 -0600

Seen: 115 times

Last updated: Aug 12 '18