Skip to content

fix(xarm): publish the wrist camera mount edge - #3871

Open
mustafab0 wants to merge 1 commit into
mb/grasp-03-gripper-open-bandfrom
mb/grasp-04-wrist-camera-tf
Open

fix(xarm): publish the wrist camera mount edge#3871
mustafab0 wants to merge 1 commit into
mb/grasp-03-gripper-open-bandfrom
mb/grasp-04-wrist-camera-tf

Conversation

@mustafab0

Copy link
Copy Markdown
Contributor

xarm_perception carried a TODO saying its tf tree was broken. RealSenseCamera publishes only its own subtree, rooted at camera_link, so camera_link had no parent, nothing the camera produced resolved into world, and the hand-eye calibration already sitting in XARM_PERCEPTION_CAMERA_TRANSFORM was dead code — the constant had neither a frame_id nor a child_frame_id.

XArmWristCameraTf hangs the camera off link7, which the planning model already publishes through tf_extra_links. It is the same StaticTfPublisher subclass the realsense package already uses to mount a standalone camera at the origin, so there is no new pathway here. The test asserts what actually breaks: that the edge is composed in, that its child is the frame the camera roots at, and that its parent is a link the model publishes — a mount edge onto an unpublished parent resolves nothing and drops silently.

Fourth of nine in the xArm grasping re-landing stack. The file it touches is replaced by blueprints/grasp.py two PRs later, which carries the class and the test forward.

xarm_perception carried a TODO saying its tf tree was broken: RealSenseCamera
publishes only its own subtree, rooted at camera_link, so camera_link had no
parent, nothing the camera produced resolved into world, and the hand-eye
calibration already sitting in XARM_PERCEPTION_CAMERA_TRANSFORM was dead code --
the constant had neither a frame_id nor a child_frame_id.

XArmWristCameraTf hangs the camera off link7, which the planning model already
publishes through tf_extra_links. It is the same StaticTfPublisher subclass the
realsense package already uses to mount a standalone camera at the origin.
@greptile-apps

greptile-apps Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Summary

This change connects the xArm wrist-mounted RealSense camera to the arm transform tree by publishing a static link7 -> camera_link edge and making that publisher available as a module.

Runtime verification confirmed that the module registry resolves the new publisher, the xArm perception blueprint composes it, and the publisher emits the expected transform from the model-published wrist frame to the RealSense root frame. The focused xArm perception test also passed.

No defects were found.

Confidence Score: 5/5

The change is safe to merge based on the verified transform wiring and passing focused test.

The registry lookup, blueprint composition, and emitted static transform were exercised directly, with the expected link7 -> camera_link connection observed.

Files Needing Attention: No files require follow-up.

T-Rex T-Rex Logs

What T-Rex did

  • Ran an authored Python validation against base revision 959bde4 and PR head 39f83fb, then executed the focused pytest target for the xArm perception test.
  • Verified on the PR head that the registry resolved the publisher, the perception blueprint integrated it, the model published link7, and the in-memory transform sink captured the timestamped edge link7 -> camera_link.
  • Observed the focused test completed with 1 passed, confirming the camera subtree is connected to the xArm transform tree.
  • Compared the baseline and PR head states: base lacked the registry entry and validation failed as expected, while the PR head now emits the timestamped edge link7 -> camera_link, with no observed security impact or verified defect.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "fix(xarm): publish the wrist camera moun..." | Re-trigger Greptile

@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
4744 1 4743 39
View the top 1 failed test(s) by shortest run time
dimos.utils.test_shm::test_create_or_attach_splits_owner_and_reader
Stack Traces | 0.615s run time
name = 'dimos_test_2132c798969f'
slow_ftruncate = <function slow_ftruncate.<locals>.delayed at 0x7f93148800e0>

    def test_create_or_attach_splits_owner_and_reader(name, slow_ftruncate):
        """Concurrent symmetric callers: exactly one owns, the other waits and attaches."""
        out: list[tuple[bool, int]] = []
        lock = threading.Lock()
        barrier = threading.Barrier(2)
    
        def racer() -> None:
            barrier.wait()
            shm, owner = create_or_attach_shm(name, SIZE, timeout=5.0)
            with lock:
                out.append((owner, shm.size))
            shm.close()
    
        threads = [threading.Thread(target=racer, daemon=True) for _ in range(2)]
        for t in threads:
            t.start()
        for t in threads:
            t.join(timeout=8)
    
        assert len(out) == 2, f"a racer did not finish: {out}"
        assert sorted(owner for owner, _ in out) == [False, True]
>       assert {size for _, size in out} == {SIZE}
E       assert {0, 65536} == {65536}
E         
E         Extra items in the left set:
E         #x1B[0m#x1B[94m0#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
E         
E         Full diff:
E         #x1B[0m#x1B[90m #x1B[39;49;00m {#x1B[90m#x1B[39;49;00m
E         #x1B[92m+     0,#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
E         #x1B[90m #x1B[39;49;00m     65536,#x1B[90m#x1B[39;49;00m
E         #x1B[90m #x1B[39;49;00m }#x1B[90m#x1B[39;49;00m

barrier    = <threading.Barrier at 0x7f93149af200: waiters=0/2>
lock       = <unlocked _thread.lock object at 0x7f936c5824c0>
name       = 'dimos_test_2132c798969f'
out        = [(False, 0), (True, 65536)]
racer      = <function test_create_or_attach_splits_owner_and_reader.<locals>.racer at 0x7f93148805e0>
slow_ftruncate = <function slow_ftruncate.<locals>.delayed at 0x7f93148800e0>
t          = <Thread(Thread-2375 (racer), stopped daemon 140268246394560)>
threads    = [<Thread(Thread-2374 (racer), stopped daemon 140266382030528)>, <Thread(Thread-2375 (racer), stopped daemon 140268246394560)>]

dimos/utils/test_shm.py:148: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

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