File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -49,10 +49,11 @@ def from_tool_model(cls, tool_model):
4949 def get_attached_collision_meshes (self ):
5050 tool_attached_collision_meshes = []
5151 for link in self .tool_model .iter_links ():
52- for item in link .collision :
52+ for i , item in enumerate ( link .collision ) :
5353 meshes = Geometry ._get_item_meshes (item )
5454 for mesh in meshes :
55- collision_mesh = CollisionMesh (item , mesh )
55+ collision_mesh_name = '{}_collision_{}' .format (link .name , i )
56+ collision_mesh = CollisionMesh (mesh , collision_mesh_name )
5657 attached_collision_mesh = AttachedCollisionMesh (collision_mesh , self .link_name , [self .link_name ])
5758 tool_attached_collision_meshes .append (attached_collision_mesh )
5859 return tool_attached_collision_meshes
@@ -64,6 +65,7 @@ def link_name(self):
6465 @link_name .setter
6566 def link_name (self , link_name ):
6667 self .tool_model .link_name = link_name
68+ self .attached_collision_meshes = self .get_attached_collision_meshes () # rebuild ACMs
6769
6870 @property
6971 def frame (self ):
You can’t perform that action at this time.
0 commit comments