Skip to content

Fix RBY1 root_body_id type: pick success was always 0 for RBY1#135

Draft
sjauhri wants to merge 1 commit into
allenai:mainfrom
sjauhri:fix/rby1-root-body-id
Draft

Fix RBY1 root_body_id type: pick success was always 0 for RBY1#135
sjauhri wants to merge 1 commit into
allenai:mainfrom
sjauhri:fix/rby1-root-body-id

Conversation

@sjauhri

@sjauhri sjauhri commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Problem

PickTask success is unattainable for RBY1 — it reports 0 for every episode, even when the object is clearly grasped and lifted. This affects the RB-Y1 pick_benchmark evaluations (see allenai/MolmoBot#9, where the released MolmoBot-RBY1Multitask checkpoint reproduces Pick&Place/Opening/Door-Opening website numbers but gets 0/100 on Pick).

Root cause

RBY1BaseGroup (and the RBY1 gripper EE groups) pass model.body(...) — a _MjModelBodyViews object — as root_body_id, while every other robot view passes model.body(...).id (an int). MoveGroup stores the value as-is.

PickTask.get_info() classifies contacts by comparing body_rootid entries (numpy ints) against robot_view.base.root_body_id:

if other_root_body == self.env.current_robot.robot_view.base.root_body_id:
    robot_collision = True
else:
    non_robot_collision = True

An int == _MjModelBodyViews comparison silently evaluates to False (verified: np.int32(view.id) == viewFalse), so every gripper–object contact is classified as a non-robot collision. only_robot_collision can therefore never be true for RBY1, and Pick success is 0 at every step of every episode — both the at-end and the any-step/oracle metrics.

Franka pick benchmarks are unaffected because all Franka views already pass .id. PnP (receptacle-support-based) and Opening/Door (joint-position-based) don't use this comparison, which is why only Pick shows the discrepancy.

Notably task.py already contains a local workaround hinting at this ("Handle both int IDs and body view objects (some robot views store the view directly)") — this PR fixes it at the source instead.

Fix

Add the missing .id in rby1_view.py (base group + gripper EE groups), matching the convention used by the head group in the same file and by all other robot views. Swept the repo for other instances of the pattern; these two lines were the only offenders.

Note for reproduction on the MolmoBot pin: the bug exists at cd23bece (the commit pinned by MolmoBot's pyproject) as well, so this patch should be applied on top of the pin when evaluating the released RBY1 checkpoints.

RBY1BaseGroup and the RBY1 gripper EE groups passed model.body(...)
(a _MjModelBodyViews object) as root_body_id, while every other robot
view passes model.body(...).id (an int). MoveGroup stores the value
as-is, so integer comparisons against it silently evaluate to False.

This broke PickTask success for RBY1: the contact check in
get_info() compares body_rootid entries (numpy ints) against
robot_view.base.root_body_id, which never matched the view object.
Every gripper-object contact was therefore classified as a non-robot
collision, making Pick success unattainable (always 0) for RBY1 even
when the object was lifted and held. Franka pick benchmarks were
unaffected since Franka views already pass ints.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018xtyJfcGQkcA6sv9bRNEZ2
@BlGene

BlGene commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

@sjauhri
Is this still a draft from your side? If not, I could merge it.

@sjauhri

sjauhri commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

@sjauhri Is this still a draft from your side? If not, I could merge it.

Yes, still a draft to be tested on Pick benchmark for rby1

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