Ros service sample code not running

when i run rosrun pkg_name and service.py it showing nothing in rosservice list and if i close rosrun then fowlling error comming
Traceback (most recent call last):
File “/home/edu/p/ros/robot/src/robot/src/service_server.py”, line 3, in
from robot.srv import WordCount,WordCountResponse
File “/home/edu/p/ros/robot/src/robot/src/robot.py”, line 4, in
rospy.init_node(‘topic_publisher’)
File “/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/client.py”, line 323, in init_node
raise rospy.exceptions.ROSInitException(“init_node interrupted before it could complete”)
rospy.exceptions.ROSInitException: init_node interrupted before it could complete

Following our Support Guidelines please ask questions on http://answers.ros.org

1 Like