How do I know the variable names in a ros service handler
In the beginner tutorial here:
def handle_add_two_ints(req):
print "Returning [%s + %s = %s]"%(req.a, req.b, (req.a + req.b))
return AddTwoIntsResponse(req.a + req.b)
I understand that the message received will get passed to the 'handle_add_two_ints' function as the object 'req' -- what I do not understand is where the naming convention comes from. They seem to have pulled '.a' and '.b' out of thin air. Can someone please clarify or point me to a site that does? What if I am passing many variables of different types... will they always be alphabetically named?