Skip to content

Commit

Permalink
Merge pull request #236 from LuziaKn/ft-add-general-visualization
Browse files Browse the repository at this point in the history
fix error due to visualization id not matching number of visualizations
  • Loading branch information
maxspahn authored Oct 19, 2023
2 parents fdfe3d9 + 467461d commit 57b82e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions urdfenvs/urdf_common/urdf_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,8 @@ def update_collision_links(self) -> None:
)

def update_visualizations(self, positions) -> None:
for visual_shape_id, info in self._visualizations.items():
position = positions[visual_shape_id-1]
for i, (visual_shape_id, info) in enumerate(self._visualizations.items()):
position = positions[i]
rotation = [1, 0, 0, 0]
p.resetBasePositionAndOrientation(
visual_shape_id, position, rotation
Expand Down

0 comments on commit 57b82e7

Please sign in to comment.