fix(xarm): stop commanding the arm on every launch - #3869
Conversation
XArmAdapter.activate() unconditionally drove the arm to a hardcoded joint pose and deactivate() drove it there again on the way out. The pose was picked by axis count from two module constants, _XARM6_INITIAL_JOINTS_DEG and _XARM7_INITIAL_JOINTS_DEG, the latter carrying a "TODO change this once we have 7dof arm setup". Nothing asked for that motion: bringing a blueprint up is a connect, and the operator has no way to know the arm is about to sweep to a pose chosen in the driver. It was also redundant, because ManipulationModule adopts wherever the arm actually is as its "init" preset from the first joint state it receives. The pose is now an explicit initial_positions argument, matching what the mock and a750 adapters already take, and rejected when its length does not match the arm's axis count the same way they reject it. With no argument the adapter commands nothing on activate or deactivate.
Greptile SummaryThis change makes xArm lifecycle movement opt-in through configured initial joint positions and updates the associated adapter tests. It also changes the isolated RealSense Rust lockfile to dependency versions that no longer match its manifests. A locked Cargo check for the RealSense crate fails because Cargo must update the committed lockfile. Merge safety: do not merge until Confidence Score: 4/5The xArm behavior change is accompanied by focused tests, but the RealSense native crate cannot be built with its committed lockfile in locked mode. A direct locked Cargo check reproduced one non-security build-breaking dependency-resolution issue. Files Needing Attention: dimos/hardware/sensors/camera/realsense/rust/Cargo.lock needs to be regenerated against the crate's current manifests and local path dependencies.
What T-Rex did
|
| name = "validator" | ||
| version = "0.21.0" | ||
| version = "0.20.0" | ||
| source = "registry+https://github.com/rust-lang/crates.io-index" | ||
| checksum = "c3d68c6633c483df6780cc5277a417c7c2d1bceee2649d06c8ab6b0fd2dd3c81" | ||
| checksum = "43fb22e1a008ece370ce08a3e9e4447a910e92621bb49b85d6e48a45397e7cfa" |
There was a problem hiding this comment.
RealSense lockfile cannot satisfy locked builds
The isolated RealSense crate’s manifests require validator 0.21 and, through the local dimos-module dependency, exactly zenoh 1.10.0, but this lockfile records validator 0.20.0 and zenoh 1.9.0. Running cargo check --locked --manifest-path Cargo.toml in this crate exits with Cargo’s “cannot update the lock file” error, so reproducible and CI-style locked builds fail until the lockfile is regenerated and committed.
Artifacts
Executed narrow lockfile validation script
- The exact shell script executed the isolated crate's locked Cargo check and printed manifest and lockfile evidence; takeaway: the validation path was narrow, reproducible, and did not edit repository source files.
Locked Cargo check reports a required lockfile update
- Captured output from the executed isolated `cargo check --locked --manifest-path Cargo.toml` command shows exit 101 and Cargo's lockfile-update error; takeaway: the candidate failure is directly reproduced.
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
XArmAdapter.activate()unconditionally drove the arm to a hardcoded joint pose, anddeactivate()drove it there again on the way out. The pose came from two module constants picked by axis count,_XARM6_INITIAL_JOINTS_DEGand_XARM7_INITIAL_JOINTS_DEG, the latter carrying aTODO (CC): change this once we have 7dof arm setup. Nothing asked for that motion: bringing a blueprint up is a connect, and the operator has no way to know the arm is about to sweep to a pose chosen inside the driver. It was redundant too, becauseManipulationModulealready adopts wherever the arm actually is as itsinitpreset from the first joint state it receives.The pose is now an explicit
initial_positionsargument, matching what the mock and a750 adapters already take, and rejected when its length does not match the arm's axis count the same way they reject it. With no argument the adapter commands nothing on either lifecycle edge. The existing activate test now asserts that noset_servo_anglereaches the SDK at all.Verified on a headless launch of the hardware grasping blueprint further up this stack: every module comes up and the run stops only where it must, at the socket connect to the arm, with zero
set_servo_anglecalls in the log.Second of nine in the xArm grasping re-landing stack.