Below is a line of code:
my_service = rospy.Service('/move_bb8_in_circle_custom', MyCustomServiceMessage , my_callback)
Is service_message name /move_bb8_in_circle_custom arbitrary…can we give any random name?..Where does these names come from ?
When you create a service, there are three elements that have to be defined. The first declares a new service, named ‘/move_bb8_in_circle_custom’ in this case. This is usually named with some description of what the behavior is when the service is called, but you can give it any name, just like when publishing a topic. The second argument is the service type, which is the name you give to the actual service file, in this case MyCustomServiceMessage.srv, and finally, all requests are passed to the function in the last argument, in this case the callback function my_callback.