Skip to content

Commit

Permalink
MuJoCo/Ant clarify the lack of use_contact_forces on v3 (and olde…
Browse files Browse the repository at this point in the history
…r) (#342)
  • Loading branch information
Kallinteris-Andreas authored Feb 21, 2023
1 parent d32bc80 commit 2f42af6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gymnasium/envs/mujoco/ant_v4.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class AntEnv(MujocoEnv, utils.EzPickle):
| 26 |angular velocity of the angle between back right links | -Inf | Inf | ankle_4 (right_back_leg) | hinge | angle (rad) |
If `use_contact_forces` is `True` then the observation space is extended by 14*6 = 84 elements, which are contact forces
If version < `v4` or `use_contact_forces` is `True` then the observation space is extended by 14*6 = 84 elements, which are contact forces
(external forces - force x, y, z and torque x, y, z) applied to the
center of mass of each of the links. The 14 links are: the ground link,
the torso link, and 3 links for each leg (1 + 1 + 12) with the 6 external forces.
Expand Down Expand Up @@ -116,7 +116,7 @@ class AntEnv(MujocoEnv, utils.EzPickle):
The total reward returned is ***reward*** *=* *healthy_reward + forward_reward - ctrl_cost*.
But if `use_contact_forces=True`
But if `use_contact_forces=True` or version < `v4`
The total reward returned is ***reward*** *=* *healthy_reward + forward_reward - ctrl_cost - contact_cost*.
In either case `info` will also contain the individual reward terms.
Expand Down

0 comments on commit 2f42af6

Please sign in to comment.