def test_srv_file(self): from roslib.srvs import srv_file d = roslib.packages.get_pkg_dir('test_ros') filename = os.path.join(d, 'srv', 'AddTwoInts.srv') with open(filename, 'r') as f: text = f.read() self.assertEquals(filename, srv_file('test_ros', 'AddTwoInts'))
def _generate_srv_text(package, type_): name, spec = roslib.srvs.load_from_file(srv_file(package, type_)) return _generate_msg_text_from_spec(package, spec.request) + \ '<hr />'+\ _generate_msg_text_from_spec(package, spec.response)