ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You are correct that AddTwoInts is an object. You imported it with the from beginner_tutorials.srv import *
command.
Please note that the following explanation applies to rosbuild. I haven't tried catkin just yet, and things are different there.
Anyway, in rosbuild, the generation of the python module happens when you run the command rosmake
. There's a macro you put in the CMakeLists.txt file, rosbuild_gensrv()
that does it for you. This is why you still have to occasionally run rosmake
even if you're using python.
(If I understand correctly, the same thing is happening in catkin, just without macros and using python or built in cmake macros instead. But like I said, I haven't actually tried it...)
If you'd like to look at the generated code, it should be in beginner_tutorials/src/beginner_tutorials/srv/_AddTwoInts.py