Skip to content

Commit 7ac9f88

Browse files
authored
Merge pull request #287 from compas-dev/fix_to_collision_meshes
fix use of getattr
2 parents 545fd51 + feb8a5d commit 7ac9f88

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Unreleased
2222

2323
* Fix ``repr()`` of ``ROSmsg`` class
2424
* Fix data type of secs and nsecs in ``Time`` ROS message
25+
* Fix ``CollisionObject.to_collision_meshes``
2526

2627
**Deprecated**
2728

src/compas_fab/backends/ros/messages/moveit_msgs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def to_collision_meshes(self):
103103
vertex.x = float(vertex.x)
104104
vertex.y = float(vertex.y)
105105
vertex.z = float(vertex.z)
106-
root_name = getattr(self.header, 'frame_id', self.header['frame_id'])
106+
root_name = getattr(self.header, 'frame_id', None) or self.header['frame_id']
107107
cm = CollisionMesh(mesh.mesh, self.id, pose.frame, root_name)
108108
collision_meshes.append(cm)
109109
return collision_meshes

0 commit comments

Comments
 (0)