File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99
1010from t4_devkit .common .converter import to_quaternion
1111from t4_devkit .common .timestamp import microseconds2seconds
12+ from t4_devkit .dataclass import SegmentationPointCloud
1213from t4_devkit .lanelet import LaneletParser
1314from t4_devkit .schema import SensorModality
1415
@@ -426,11 +427,17 @@ def render_pointcloud(
426427 # TODO(ktro2828): add support of rendering pointcloud on images
427428 rr .set_time_seconds (self .config .timeline , seconds )
428429
429- colors = pointcloud_color (pointcloud , color_mode = color_mode )
430- rr .log (
431- format_entity (self .config .ego_entity , channel ),
432- rr .Points3D (pointcloud .points [:3 ].T , colors = colors ),
433- )
430+ if isinstance (pointcloud , SegmentationPointCloud ):
431+ rr .log (
432+ format_entity (self .config .ego_entity , channel ),
433+ rr .Points3D (pointcloud .points [:3 ].T , class_ids = pointcloud .labels ),
434+ )
435+ else :
436+ colors = pointcloud_color (pointcloud , color_mode = color_mode )
437+ rr .log (
438+ format_entity (self .config .ego_entity , channel ),
439+ rr .Points3D (pointcloud .points [:3 ].T , colors = colors ),
440+ )
434441
435442 @_check_spatial3d
436443 def render_lidarseg (
You can’t perform that action at this time.
0 commit comments