Skip to content

Commit

Permalink
Merge pull request #1275 from TyLindberg:patch-1
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 590693053
Change-Id: Ie1ec8edc2681050f089f150a775612fc8449d948
  • Loading branch information
copybara-github committed Dec 13, 2023
2 parents 1c34553 + b82c382 commit 4bbb191
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions mjx/tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -416,10 +416,8 @@
" forward_reward = self._forward_reward_weight * velocity[0]\n",
"\n",
" min_z, max_z = self._healthy_z_range\n",
" is_healthy = jp.where(data.qpos[2] \u003c min_z, x=0.0, y=1.0)\n",
" is_healthy = jp.where(\n",
" data.qpos[2] \u003e max_z, x=0.0, y=is_healthy\n",
" )\n",
" is_healthy = jp.where(data.qpos[2] \u003c min_z, 0.0, 1.0)\n",
" is_healthy = jp.where(data.qpos[2] \u003e max_z, 0.0, is_healthy)\n",
" if self._terminate_when_unhealthy:\n",
" healthy_reward = self._healthy_reward\n",
" else:\n",
Expand Down

0 comments on commit 4bbb191

Please sign in to comment.