Skip to content

Commit

Permalink
Displays step.
Browse files Browse the repository at this point in the history
  • Loading branch information
wojzaremba committed Jul 11, 2017
1 parent 96085f4 commit 45e5cd6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
generated/cymj*
mujoco_py/generated/cymj*
_pyxbld*
dist
cache
Expand Down
4 changes: 2 additions & 2 deletions mujoco_py/mjviewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,8 @@ def _create_full_overlay(self):
(1 / self._time_per_render, extra))
self.add_overlay(const.GRID_BOTTOMLEFT, "Solver iterations", str(
self.sim.data.solver_iter + 1))
self.add_overlay(const.GRID_BOTTOMRIGHT, "step",
str(int(self.sim.data.time / self.sim.model.opt.timestep)))
step = round(self.sim.data.time / self.sim.model.opt.timestep)
self.add_overlay(const.GRID_BOTTOMRIGHT, "step", str(step))

def key_callback(self, window, key, scancode, action, mods):
if action != glfw.RELEASE:
Expand Down

0 comments on commit 45e5cd6

Please sign in to comment.