File tree Expand file tree Collapse file tree 3 files changed +19
-6
lines changed Expand file tree Collapse file tree 3 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ mesh_files:
7878 mesh :
7979 package : ur_description
8080 path : meshes/ur3/collision/wrist2.stl
81- visual_offset : -0.085
81+ visual_offset : -0.083
8282
8383 wrist_3 :
8484 visual :
@@ -93,3 +93,4 @@ mesh_files:
9393 package : ur_description
9494 path : meshes/ur3/collision/wrist3.stl
9595 visual_offset : -0.082
96+ visual_offset_xyz : " 0 -0.00255 -0.082"
Original file line number Diff line number Diff line change 2222 </xacro : macro >
2323
2424 <xacro : macro name =" get_visual_params" params =" name:=^ type:=^" >
25- <xacro : property name =" visual_params" value =" ${sec_mesh_files[name][type]}" scope =" parent" />
25+ <xacro : if value =" ${type in sec_mesh_files[name]}" >
26+ <xacro : property name =" visual_params" value =" ${sec_mesh_files[name][type]}" scope =" parent" />
27+ </xacro : if >
28+ <xacro : unless value =" ${type in sec_mesh_files[name]}" >
29+ <xacro : property name =" visual_params" value =" " scope =" parent" />
30+ </xacro : unless >
2631 </xacro : macro >
2732
2833 <!-- Simplification of getting meshes. Available types can be seen in the visual_parameters.yaml (At the time of writing: visual, collision) -->
Original file line number Diff line number Diff line change 199199 </inertial >
200200 </link >
201201 <link name =" ${tf_prefix}wrist_2_link" >
202- <xacro : get_visual_params name =" wrist_2" type =" visual_offset" />
202+ <xacro : get_visual_params name =" wrist_2" type =" visual_offset" />
203203 <visual >
204204 <origin xyz =" 0 0 ${visual_params}" rpy =" 0 0 0" />
205205 <geometry >
226226 </inertial >
227227 </link >
228228 <link name =" ${tf_prefix}wrist_3_link" >
229- <xacro : get_visual_params name =" wrist_3" type =" visual_offset" />
229+ <!-- TODO: remove this once all wrist_3 meshes have the visual_offset_xyz tag -->
230+ <xacro : get_visual_params name =" wrist_3" type =" visual_offset_xyz" />
231+ <xacro : property name =" mesh_offset" value =" ${visual_params}" scope =" parent" />
232+
233+ <xacro : if value =" ${visual_params == ''}" >
234+ <xacro : get_visual_params name =" wrist_3" type =" visual_offset" />
235+ <xacro : property name =" mesh_offset" value =" 0 0 ${visual_params}" scope =" parent" />
236+ </xacro : if >
230237 <visual >
231- <origin xyz =" 0 0 ${visual_params }" rpy =" ${pi/2} 0 0" />
238+ <origin xyz =" ${mesh_offset }" rpy =" ${pi/2} 0 0" />
232239 <geometry >
233240 <xacro : get_mesh name =" wrist_3" type =" visual" />
234241 </geometry >
235242 </visual >
236243 <collision >
237- <origin xyz =" 0 0 ${visual_params }" rpy =" ${pi/2} 0 0" />
244+ <origin xyz =" ${mesh_offset }" rpy =" ${pi/2} 0 0" />
238245 <geometry >
239246 <xacro : get_mesh name =" wrist_3" type =" collision" />
240247 </geometry >
You can’t perform that action at this time.
0 commit comments