ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What you are missing is your custom messages create a python module mytest in ros_ws/devel/lib/... It has a .py file for each custom message.

So when your mytest2 looks for python module mytest, the first one it finds is ros_ws/src/mytest/src/mytest. This python module has no submodule msg, so an error is thrown.

It's bad practice to name your ros-package the same as a nested python module, and this is the reason why.

Not a bug.

What you are missing is your custom messages create a python module mytest in ros_ws/devel/lib/... It has a .py file for each custom message.

So when your mytest2 looks for python module mytest, the first one it finds is ros_ws/src/mytest/src/mytest. This python module has no submodule msg, so an error is thrown.

It's bad practice to name your ros-package the same as a nested python module, and this is the reason why.