12 lines
350 B
Python
12 lines
350 B
Python
# coding: utf-8
|
|
|
|
import glob
|
|
|
|
|
|
def get_urdf_sdf_model_paths(models_dir):
|
|
''' Collect models paths. '''
|
|
model_paths = []
|
|
for file_name in glob.glob(f'{models_dir}/**', recursive=True):
|
|
if file_name.endswith('.urdf') or file_name.endswith('.sdf'):
|
|
model_paths.append(file_name.replace('\\', '/'))
|
|
return model_paths
|