Skip to content

Commit

Permalink
Avoid looping with index
Browse files Browse the repository at this point in the history
  • Loading branch information
RainerKuemmerle committed Jul 21, 2024
1 parent a149a2f commit 6d43bd2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/examples/gicp_sba_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ def main():
trans0 = optimizer.vertex(0).estimate().inverse()
trans1 = optimizer.vertex(1).estimate().inverse()

for i in range(len(true_points)):
pt0 = trans0 * true_points[i]
pt1 = trans1 * true_points[i]
for i, true_pt in enumerate(true_points):
pt0 = trans0 * true_pt
pt1 = trans1 * true_pt

# add noise
pt0 += np.random.randn(3) * args.pos_noise
Expand Down

0 comments on commit 6d43bd2

Please sign in to comment.