Skip to content

Commit

Permalink
Added multi-frame rendering and frame navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
lisiyi777 committed Jul 30, 2024
1 parent d8280d5 commit 048877f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flow_lab/flow_lab.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,12 +430,12 @@ def render_pc_and_boxes(self, vis):
# Loop over the frames and display pointclouds
for i in range(start_index, end_index):
frame = self.frames[i]
ego_translation = frame.pc.global_pose.translation
pc_color = [1, 0, 0] if i == current_frame_index else [0.75, 0.75, 0.75]
vis.add_geometry(frame.pc.ego_pc.to_o3d().paint_uniform_color(pc_color))

# Render bounding boxes for the current frame only
frame = self.frames[current_frame_index]
ego_translation = frame.pc.global_pose.translation
for idx, box in enumerate(frame.boxes):
box_translation = box.pose.transform_matrix[:3, 3]
if np.linalg.norm(ego_translation - box_translation) < self.cropping_range:
Expand Down

0 comments on commit 048877f

Please sign in to comment.