From 8797f8818086174509d3a9c288eccbaf713ad532 Mon Sep 17 00:00:00 2001 From: Snehal Jauhri Date: Tue, 21 Jul 2026 15:31:15 +0200 Subject: [PATCH] Fix RBY1 root_body_id: pass int id instead of body view object 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 Claude-Session: https://claude.ai/code/session_018xtyJfcGQkcA6sv9bRNEZ2 --- molmo_spaces/robots/robot_views/rby1_view.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/molmo_spaces/robots/robot_views/rby1_view.py b/molmo_spaces/robots/robot_views/rby1_view.py index dfa07b69..98faaa5c 100644 --- a/molmo_spaces/robots/robot_views/rby1_view.py +++ b/molmo_spaces/robots/robot_views/rby1_view.py @@ -96,7 +96,7 @@ def __init__( model.joint(f"{namespace}gripper_finger_{side[0]}{i + 1}").id for i in range(2) ] act_ids = [model.actuator(f"{namespace}{side}_finger_act").id] - root_body_id = model.body(f"{namespace}EE_BODY_{side[0].upper()}") + root_body_id = model.body(f"{namespace}EE_BODY_{side[0].upper()}").id super().__init__(mj_data, joint_ids, act_ids, root_body_id, base) self._ee_site_id = model.site(f"{namespace}ee_site_{side[0]}").id @@ -246,7 +246,7 @@ def __init__(self, mj_data: MjData, namespace: str = "") -> None: holo_base_site_id = model.site(f"{namespace}base_site").id joints = [model.joint(f"{namespace}base_{axis}").id for axis in ["x", "y", "theta"]] act = [model.actuator(f"{namespace}base_{axis}_act").id for axis in ["x", "y", "theta"]] - root_body_id = model.body(f"{namespace}base") + root_body_id = model.body(f"{namespace}base").id super().__init__(mj_data, world_site_id, holo_base_site_id, joints, act, root_body_id)