Skip to content

Commit cb7e705

Browse files
committed
When deserializing from data, ctor of ACM fails
The collision_mesh param is empty, but its root_name has been set already, so, instead we don't try to do reassign it, it will be deserialized from data.
1 parent 5320414 commit cb7e705

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/compas_fab/robots/planning_scene.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ class AttachedCollisionMesh(object):
170170

171171
def __init__(self, collision_mesh, link_name, touch_links=None, weight=1.):
172172
self.collision_mesh = collision_mesh
173-
self.collision_mesh.root_name = link_name
173+
if self.collision_mesh:
174+
self.collision_mesh.root_name = link_name
174175
self.link_name = link_name
175176
self.touch_links = touch_links if touch_links else [link_name]
176177
self.weight = weight

0 commit comments

Comments
 (0)