ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

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



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

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

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

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

1 Answer

Sort by ยป oldest newest most voted

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/ (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


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

Seen: 649 times

Last updated: Aug 12 '18