File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -535,6 +535,12 @@ def export_updated_model(self) -> str:
535535 if link_name not in links_dict :
536536 continue
537537
538+ # Skip links with unsupported shapes
539+ shape = hw_metadata .link_shape [link_index ]
540+ if shape == LinkParametrizableShape .Unsupported :
541+ logging .debug (f"Skipping link '{ link_name } ' with unsupported shape" )
542+ continue
543+
538544 # Update mass and inertia
539545 mass = float (self .kin_dyn_parameters .link_parameters .mass [link_index ])
540546 center_of_mass = np .array (
@@ -556,7 +562,6 @@ def export_updated_model(self) -> str:
556562 )
557563
558564 # Update visual shape
559- shape = hw_metadata .link_shape [link_index ]
560565 dims = hw_metadata .geometry [link_index ]
561566 if shape == LinkParametrizableShape .Box :
562567 links_dict [link_name ].visual .geometry .box .size = dims .tolist ()
You can’t perform that action at this time.
0 commit comments