Skip to content

Comments

Refactor toe anatomy: split single toe into 3 separate digits#74

Merged
kuds merged 4 commits intomainfrom
claude/three-claw-feet-models-51a0f
Feb 22, 2026
Merged

Refactor toe anatomy: split single toe into 3 separate digits#74
kuds merged 4 commits intomainfrom
claude/three-claw-feet-models-51a0f

Conversation

@kuds
Copy link
Owner

@kuds kuds commented Feb 22, 2026

This pull request makes significant improvements to the anatomical accuracy and control of the T-Rex and Velociraptor simulation environments, as well as updates their observation and action spaces. The changes include refactoring toe structures to use anatomically correct digits, updating actuator definitions, expanding observation and action spaces, and improving episode termination logic for head-ground contact. Tests are also updated to reflect these changes.

Anatomical and Actuator Updates

  • Refactored toe structures in trex.xml and raptor.xml to model three separate forward-facing digits per foot, improving anatomical correctness and control granularity. This replaces previous fused toe bodies with individual digits (d2, d3, d4), and updates associated actuators and keyframes. (environments/trex/assets/trex.xml, [1] [2] [3] [4]; environments/velociraptor/assets/raptor.xml, [5] [6]
  • Updated actuator definitions to provide individual control for each toe digit, expanding the action space for both T-Rex and Velociraptor. (environments/trex/assets/trex.xml, [1]; environments/velociraptor/assets/raptor.xml, [2] [3]

Observation and Action Space Expansion

  • Increased the observation and action space dimensions for both T-Rex and Velociraptor to account for the new toe digits and additional joint/velocity sensors. Documentation and code comments are updated accordingly. (README.md, [1] [2]; environments/velociraptor/README.md, [3]; environments/trex/envs/trex_env.py, [4] F7eb3d17L15R16; environments/trex/tests/test_trex_env.py, [5]

Termination Logic Improvements

  • Enhanced episode termination logic by adding head/skull collision detection: now, the episode terminates if the head contacts the ground, with clear reporting for head, torso, or tail contact reasons. (environments/trex/envs/trex_env.py, [1] [2] [3] [4]

Test Coverage and Validation

  • Added and updated tests to verify new head-ground termination logic, correct actuator and observation space dimensions, and proper caching of head geom IDs. (environments/trex/tests/test_trex_env.py, [1] [2]

Documentation and Path Updates

  • Updated documentation and internal links to reflect new observation/action space sizes and anatomical details, including a path change for the roadmap file. (README.md, [1]; environments/velociraptor/README.md, [2]

These changes collectively improve the realism, control fidelity, and robustness of the environments, making them more suitable for advanced curriculum learning and sim-to-real transfer experiments.

…ex and Raptor

T-Rex: Split fused single-toe foot into 3 separate digits (d2 medial,
d3 central, d4 lateral) per foot. Action space 14→18, obs space 77→85.

Raptor: Split fused toe_main (digits 3+4) into separate d3 and d4 per
foot, keeping the sickle claw (digit 2) unchanged. Action space 15→17,
obs space 69→73.

Each digit has independent flexion/extension control, creating a wider
triangular support polygon for more realistic ground contact and gait
dynamics. Mass is distributed proportionally across digits.

https://claude.ai/code/session_01DeR9QgJCPofesh1G4JLrSW
Update observation/action space dimensions across all documentation:
- T-Rex: obs 77→85, actions 14→18, hinge joints 22→26
- Raptor: obs 69→73, actions 12→17, hinge joints 18→20

Files updated: README.md, website model docs, API overview,
velociraptor README, and website homepage.

https://claude.ai/code/session_01DeR9QgJCPofesh1G4JLrSW
The T-Rex was missing skull/jaw/snout geoms in its termination set,
so a faceplant wouldn't end the episode (unlike the raptor which
already terminates on head/neck contact). Add skull_upper, snout,
and jaw_geom to _body_ground_geoms with a dedicated _head_ground_geoms
set for the "head_contact" termination reason.

neck_geom and brow_ridge have contype=0 (no collisions) so they
can't produce floor contacts and are intentionally excluded.

https://claude.ai/code/session_01DeR9QgJCPofesh1G4JLrSW
Move PLAN.md, RECOMMENDATIONS.md, ROADMAP.md, and TRAINING_REVIEW.md
from the repo root into docs/ to reduce top-level clutter. Update
the ROADMAP link in README.md accordingly.

Also apply ruff format to test_trex_env.py and test_static_balance.py.

https://claude.ai/code/session_01DeR9QgJCPofesh1G4JLrSW
@kuds kuds merged commit caf9a96 into main Feb 22, 2026
6 checks passed
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.

2 participants