ImportError: No module named waypoint_listener.srv
I'm trying to create a service, but i can't use it in python(didn't tested in C++).
I have the following CMakeList file
cmake_minimum_required(VERSION 2.8.3)
project(waypoint_listener)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
rospy
geometry_msgs
message_generation
)
## Generate services in the 'srv' folder
add_service_files(
FILES
WaypointServer.srv
# Service1.srv
# Service2.srv
)
## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
geometry_msgs
)
catkin_package(
INCLUDE_DIRS
CATKIN_DEPENDS message_runtime rospy geometry_msgs
)
###########
## Build ##
###########
## Specify additional locations of header files
## Your package locations should be listed before other locations
# include_directories(include)
include_directories(
${catkin_INCLUDE_DIRS}
)
in python file i imported the srv file, this way
from waypoint_listener.srv import *
but i'm getting the following error
Traceback (most recent call last):
File "/home/vitor/catkin_ws/src/viz/waypoint_listener/scripts/waypoints_server.py", line 5, in <module>
from waypoint_listener.srv import *
ImportError: No module named srv
Did you solve the problem?