Skip to content

Commit

Permalink
[VizMarkerPublisher] use scale values of geometry if exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdelrhmanBassiouny committed Dec 5, 2024
1 parent 31eccb4 commit 784f43c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/pycram/ros_utils/viz_marker_publisher.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ def _make_marker_array(self) -> MarkerArray:
if isinstance(geom, MeshVisualShape):
msg.type = Marker.MESH_RESOURCE
msg.mesh_resource = "file://" + geom.file_name
msg.scale = Vector3(1, 1, 1)
if hasattr(geom, "scale") and geom.scale is not None:
msg.scale = Vector3(*geom.scale)
else:
msg.scale = Vector3(1, 1, 1)
msg.mesh_use_embedded_materials = True
elif isinstance(geom, CylinderVisualShape):
msg.type = Marker.CYLINDER
Expand Down

0 comments on commit 784f43c

Please sign in to comment.