ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I had this error because of module name conflict.
e.g.:
catkin_ws/
| src/
| package/
| srv/
| service.srv
| scripts
| package.py
| code_using_service.py
I was importing the service into the code_using_service.py
file and got the error message:
from package.srv import *
ImportError: No module named srv
It was looking for the srv module inside my package.py
module instead of inside my package/
module. So I just renamed my script file to package_node.py
to avoid the conflict.