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

It's an old question, but still a top hit on Google. So I'll post a possible solution:

First of all, as dornhege pointed out, your import statement is incorrect. It should be:

from myModuleName.srv import mysrv

Also, have you sourced the setup.bash file in your catkin workspace? It should be at catkin_workspace_name/devel/setup.bash (where catkin_workspace_name is swapped with the name of your catkin workspace). To source it:

source /path/path/path/catkin_workspace_name/devel/setup.bash

You can also add that line to your .bashrc file so that it's automatically sourced every time you open a terminal.