Skip to content

docs(envs): fix Ant and Humanoid space ordering docstrings - #685

Open
M-Colley wants to merge 1 commit into
google:mainfrom
M-Colley:fix/issue-483-env-space-docs
Open

M-Colley wants to merge 1 commit into
google:mainfrom
M-Colley:fix/issue-483-env-space-docs

Conversation

@M-Colley

Copy link
Copy Markdown

The class docstrings in Ant, Humanoid, and HumanoidStandup documented outdated action and observation space layouts relative to their MJCF assets. Specifically, brax/envs/assets/ant.xml defines motor actuators starting with hip_4 and ankle_4, and Ant.step checks torso height at observation index 0. Similarly, brax/envs/assets/humanoid.xml and brax/envs/assets/humanoidstandup.xml fuse the two jointless foot bodies into their parent shins and order hip hinge joints as x, z, and y, producing 11 links and 244-element observations. Fixes #483.

This change updates the Action Space, Observation Space, and Episode Termination docstrings in brax/envs/ant.py, brax/envs/humanoid.py, and brax/envs/humanoidstandup.py to match their corresponding MJCF models. Additionally, tests/envs_doc_test.py parses the environment docstrings and MJCF XML files to verify actuator ordering, joint ordering, coordinate axis labels, and observation dimensions.

Verification ran pytest tests/envs_doc_test.py (2 passed) and python -m py_compile across all modified and added Python files.

Update Action Space, Observation Space, and Episode Termination
docstrings in Ant, Humanoid, and HumanoidStandup to match their MJCF
definitions. Add unit tests verifying docstring tables against XML
joints, actuators, coordinate axis labels, and fused link counts.

Fixes google#483.

Signed-off-by: Mark Colley <39366189+M-Colley@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation bug: wrong observation and action spaces ordering

1 participant