Service quiz - problem reading the custom message


I’ve created the custom message correctly (checked it with rossrv list and rossrv show). But when I try to launch the code, I get the following error message:

ImportError: No module named BB8CustomServiceMessage.srv

I’ve triple checked the permissions (all executables: file and directories), the file name, deleted it and recreated it, recompliled, sourced (many times!). Nothing seems to work. What could be the problem and how can I solve it? Any help will be greatly appreciated.


Hi @paedusan,

Is BB8CustomServiceMessage the name of your package? It seems you’re mixing up the package and custom message names.

The import line format is:

from [name_of_package_containing_custom_service].srv import CustomServiceMessage

Yes! I was messing up the package name with custom message names. Thanks very much for the spot on reply!

1 Like