initial WIP changes to support sonic in robosuite still needs review and ton more features, but right now locomotion in the robosuite env works with keyboard#809
Open
Abhiram824 wants to merge 3 commits into
Conversation
…and ton more features, but right now locomotion in the robosuite env works with keyboard
Replace the full-qpos freeze/fall-recovery startup hold in SonicWholeBodyController with an elastic band: a spring-damper force on the PELVIS body only (mj_data.xfrc_applied), never a qpos write, so free task objects (e.g. a manipulation env's cube/pot) evolve under normal physics instead of being teleported back to a snapshot every step. Reuses gear_sonic's ElasticBand (the same law base_sim uses), anchored at the spawn pose; released manually via band_enabled / release_band()/toggle_band() (the collector binds '9' in the viewer, mirroring base_sim). No fall recovery (a collapse stays down, by design). Also this session: - Remove the _SOURCE_FACTORY hook: the controller always builds DDSCommandSource; tests/collector override by monkeypatching the module's DDSCommandSource symbol (_patch_source). - Resolve the WBC config path from the installed gear_sonic package (_wbc_config_path); keep the guarded WBC_CONFIG export for tests/scripts. - Rename the opaque 1-2 letter locals in _prepare/run_controller. - collect_sonic_g1_demos.py: migrate off the removed factory hook, wire the band-release key, refresh docstrings, drop dead imports. - Add test_sonic_startup_band_is_object_safe (perturb TwoArmLift's pot, step, assert it is not snapped back + the pelvis band force is set/cleared). Tests: robosuite SonicG1 suite 8/8. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Builds on the band commit (80dc64c): - SonicG1 base placement: zero _base_offset (robosuite derives it from the root body's authored pos, and our pelvis is authored at z=0.793, so set_base_xpos buried the pelvis at -0.793) and put the stand height in base_xpos_offset.z (GR1 convention). The env now stands the floating robot at [front-of-table, 0.793], feet on the floor, in Lift/Stack/TwoArmLift. - collect_sonic_g1_demos.py: --environment loads ANY registered robosuite env via robosuite.make (not just the table-free SonicArena) -- safe now that the band no longer pins qpos; --robot selects SonicG1[/Fixed]; make_env() helper; set_init_pose sets JOINTS only (the env owns base placement). - Bundles external asset updates (build_sonic_g1_assets.py / robot.xml). SonicG1 suite 8/8; replay records a demo.hdf5 in Lift with the cube freejoint in the recorded state. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP