ImportError: cannot import name AddTWoIntsResponse
I am following a tutorial and where my srv file is AddTwoInts.srv
int64 a
int64 b
---
int64 sum
and i have created a server.py file under scripts
#!/usr/bin/env python
from __future__ import print_function
from service_node.srv import AddTwoInts,AddTWoIntsResponse
import rospy
def handle_add_two_inst(req):
print("Returning [%s + %s = %s]"%(req.a, req.b, (req.a + req.b)))
return AddTwoIntsResponse(req.a + req.b)
def add_two_ints_server():
rospy.init_node('add_two_ints_server')
s= rospy.Service('add_two_ints', AddTwoInts, handle_add_two_ints)
print("Ready to add two ints.")
rospy.spin()
if __name__ == "__main__":
add_two_ints_server()
after made changes on cmake and package xml and runiing catkin_make
i tried to run the server.py using
rosrun service_node server.py
and i am getting the following error
Traceback (most recent call last):
File "/home/akash/catkin_ws/src/service_node/scripts/server.py", line 5, in <module>
from service_node.srv import AddTwoInts,AddTWoIntsResponse
ImportError: cannot import name AddTWoIntsResponse