rospy: Calling /clear service programatically
I have not seen the answer to this in docs or on this forum.
I'm writing a simple program publishing to command_velocity to move a turtle around in turtlesim_node (all of this in rospy). Before I start moving my turtle, I'd like to change the background color.
I've updated the relevant parameters but now I find myself completely unable to call the /clear service from within my python node.
According to elsewhere on the interwebs, this line of code should work:
clear_bg = rospy.ServiceProxy('clear', turtlesim.srv.Clear)
yet I'm getting "AttributeError: 'module' object has no attribute 'Clear'"
And, sure enough, when I roscd over to [...]/ros_tutorials/turtlesim/srv/, there is no clear.srv file. Ros is kicking my butt on this one point and if you can help, you will have my eternal gratitude for at least the rest of the day.
FYI - I'm hoping not only for a line of code in the answer but also a short explanation of how you knew where to find this - it seems frustratingly underdocumented! I'll be working with ROS more in the future so I'd hope to learn something more from this than just the right characters to type in this one uncommon case.
PS - I would prefer not to post my entire code. This is a small part of a class assignment (maybe 1-2%?) and I want to avoid putting the whole of the source code out there for google to index and others to find...