16 from __future__
import print_function
22 PKG =
'uuv_descriptions' 23 NAME =
'test_urdf_files' 26 roslib.load_manifest(PKG)
30 assert os.path.isfile(xml_file),
'Invalid XML xacro file' 31 return subprocess.check_output([
'xacro',
'--inorder', xml_file])
37 test_dir = os.path.abspath(os.path.dirname(__file__))
38 robots_dir = os.path.join(test_dir,
'..',
'robots')
40 for item
in os.listdir(robots_dir):
43 if not os.path.isfile(os.path.join(robots_dir, item)):
45 output =
call_xacro(os.path.join(robots_dir, item))
49 'Parsing error found for file {}'.format(item))
52 'No such file or directory',
53 'Some file not found in {}'.format(item))
55 if __name__ ==
'__main__':
57 rosunit.unitrun(PKG, NAME, TestRexROVURDFFiles)