Commit 79a2fa5 1 parent 226f81c commit 79a2fa5 Copy full SHA for 79a2fa5
File tree 1 file changed +8
-1
lines changed
moveit_configs_utils/moveit_configs_utils
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,7 @@ def __init__(
162
162
163
163
self .__urdf_package = None
164
164
self .__urdf_file_path = None
165
+ self .__urdf_xacro_args = None
165
166
self .__srdf_file_path = None
166
167
167
168
modified_urdf_path = Path ("config" ) / (self .__robot_name + ".urdf.xacro" )
@@ -179,6 +180,11 @@ def __init__(
179
180
)
180
181
self .__urdf_file_path = Path (urdf_config ["relative_path" ])
181
182
183
+ if (xacro_args := urdf_config .get ("xacro_args" )) is not None :
184
+ self .__urdf_xacro_args = dict (
185
+ arg .split (":=" ) for arg in xacro_args .split (" " ) if arg
186
+ )
187
+
182
188
srdf_config = config .get ("srdf" , config .get ("SRDF" ))
183
189
if srdf_config :
184
190
self .__srdf_file_path = Path (srdf_config ["relative_path" ])
@@ -224,7 +230,8 @@ def robot_description(
224
230
try :
225
231
self .__moveit_configs .robot_description = {
226
232
self .__robot_description : load_xacro (
227
- robot_description_file_path , mappings = mappings
233
+ robot_description_file_path ,
234
+ mappings = mappings or self .__urdf_xacro_args ,
228
235
)
229
236
}
230
237
except ParameterBuilderFileNotFoundError as e :
You can’t perform that action at this time.
0 commit comments