Skip to content

golem_robocasa: remove dead code - #24

Open
maxconwa wants to merge 1 commit into
mainfrom
cleanup/golem_robocasa
Open

maxconwa wants to merge 1 commit into
mainfrom
cleanup/golem_robocasa

Conversation

@maxconwa

Copy link
Copy Markdown
Contributor

Dead-code sweep of golem_robocasa/ (third_party excluded). The package was already clean, so this is small. Default behaviour is unchanged: same topics, DDS, knobs, defaults, spawn and sensors. The surface goldens are untouched.

Removed

  • robosuite_common.install_robocasa_patches fallbacks: the try/except around from robocasa.utils import env_utils (and its warning), the getattr(EU, ..., None) guards on set_robot_base, set_robot_to_position and _ROBOT_POS_OFFSETS, the is not None branches, and the "no RoboCasa placement entry point found" warning. Evidence: in golem_sim_robocasa:latest, env_utils has both functions ((env, anchor_pos, anchor_ori, rot_dev, pos_dev_x, pos_dev_y) and (env, global_pos)) and _ROBOT_POS_OFFSETS is a dict. Also, make_kitchen_env imports robocasa on the line after the patch, so a missing RoboCasa already failed there. Both functions are now patched unconditionally, with the same wrappers.
  • **kwargs on make_kitchen_env (in robosuite_common, h1_2_robosuite and g1/g1_robosuite): a repo-wide grep finds no caller that passes extra keyword arguments.

Net: 3 files, +37 / -58.

Checked and kept

  • robosuite overrides (format_action, _important_geoms, dof, default_*, _eef_name, arm_type, top_offset, ...): robosuite calls them, not this repo.
  • unitree_common.LowStateWriter.bytes_for and mid360.LidarFrame.rays: only tests read them, but they are how test_lowstate_writer.py (numpy wire bytes vs the SDK serializer and CRC) and the lidar frame tests check production behaviour. Kept, unsure.
  • Every GOLEM_* knob the package reads is documented in CLAUDE.md or docs, or passed by compose or test scripts. Every realsense_profile.yaml key is read, and every one is in the example. Every module is imported. Every definition has a docstring. There is no commented-out code, and I found no comment that breaks the repo's comment rules.

Tests (worktree, before / after)

  • tests/robocasa/run_in_container.sh (ROS_DOMAIN_ID=129): 195 OK (1 skip) / 195 OK (1 skip)
  • tests/robocasa/g1/run_in_container.sh: 7 files, 59 tests OK / same
  • pytest -q tests/docker: 115 passed after
  • Not run here: the closed-loop tests/sim and tests/g1.

🤖 Generated with Claude Code

https://claude.ai/code/session_015EG7p8sgY1ZVi6unbbLp4J

install_robocasa_patches guarded every RoboCasa entry point it patches
(env_utils itself, set_robot_base, set_robot_to_position,
_ROBOT_POS_OFFSETS) with a fallback and a warning for a RoboCasa that
lacks it. The robocasa image's pinned RoboCasa has all of them, and
make_kitchen_env imports robocasa right after the patch anyway, so the
fallbacks never run: patch both functions unconditionally.

make_kitchen_env's **kwargs pass-through (all three definitions) has no
caller that passes anything through it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015EG7p8sgY1ZVi6unbbLp4J
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.

1 participant