Skip to content

Commit

Permalink
fix visualization pose numbers discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
true-real-michael committed Nov 16, 2023
1 parent 82c8e6e commit 1401a8a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions octreelib/grid/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ def visualize(self, config: VisualizationConfig = VisualizationConfig()) -> None
"""
plot = k3d.Plot()
random.seed(config.seed)
poses_number = len(self.__octrees.keys()) + 1
poses_numbers = self.__pose_voxel_coordinates.keys()

if config.type is GridVisualizationType.POSE:
for pose_number in range(poses_number):
for pose_number in poses_numbers:
color = random.randrange(0, 0xFFFFFF)
points = self.get_points(pose_number=pose_number)

Expand All @@ -174,7 +174,7 @@ def visualize(self, config: VisualizationConfig = VisualizationConfig()) -> None
)
elif config.type is GridVisualizationType.VOXEL:
voxels_colors = {}
for pose_number in range(poses_number):
for pose_number in poses_numbers:
leaves = self.get_leaf_points(pose_number=pose_number)
for leaf in leaves:
if leaf.id not in voxels_colors.keys():
Expand All @@ -188,7 +188,7 @@ def visualize(self, config: VisualizationConfig = VisualizationConfig()) -> None
)

vertices = []
for pose_number in range(poses_number):
for pose_number in poses_numbers:
# TODO: Draw full grid including empty voxels
leaves = self.get_leaf_points(pose_number=pose_number)
for leaf in leaves:
Expand Down

0 comments on commit 1401a8a

Please sign in to comment.