@@ -156,16 +156,20 @@ class LocalPackageMeshLoader(AbstractMeshLoader):
156156 ----------
157157 path : str
158158 Path where the package is stored locally.
159- support_package : str
159+ support_package : str, optional
160160 Name of the support package containing URDF, Meshes
161- and additional assets, e.g. 'abb_irb4400_support'
161+ and additional assets, e.g. 'abb_irb4400_support'.
162+ Default is None.
162163 """
163164
164- def __init__ (self , path , support_package ):
165+ def __init__ (self , path , support_package = None ):
165166 super (LocalPackageMeshLoader , self ).__init__ ()
166167 self .path = path
167168 self .support_package = support_package
168- self .schema_prefix = "package://" + self .support_package + "/"
169+ if not support_package :
170+ self .schema_prefix = "package://"
171+ else :
172+ self .schema_prefix = "package://" + self .support_package + "/"
169173
170174 def build_path (self , * path_parts ):
171175 """Returns the building path.
@@ -179,7 +183,10 @@ def build_path(self, *path_parts):
179183 -------
180184 str
181185 """
182- return os .path .join (self .path , self .support_package , * path_parts )
186+ if not self .support_package :
187+ return os .path .join (self .path , * path_parts )
188+ else :
189+ return os .path .join (self .path , self .support_package , * path_parts )
183190
184191 def load_urdf (self , file ):
185192 """Load a URDF file from local storage.
0 commit comments