fix(zed): remove hidden realsense dependency#323
Open
alectimison-maker wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rcs_zed's import-time dependency onrcs_realsensedefault_zed()accept an explicit per-cameraCalibrationStrategymappingZEDCameraSet's existingDummyCalibrationStrategyfallback when nostrategy is supplied
default_zed_dummy_calibration()as a backward-compatible wrapperthat masked the packaging problem
Motivation
rcs_zed.utilsimportedFR3BaseArucoCalibrationfromrcs_realsense.calibration, butrcs_zeddid not declarercs_realsenseas adependency. Its local Makefile added
../rcs_realsense/srctoPYTHONPATH, sothe extension appeared to work in a repository checkout while a standalone
installation could fail as soon as
rcs_zed.utilswas imported.Declaring
rcs_realsenseas a dependency would make ZED users install theunrelated
pyrealsense2hardware stack. Moving the FR3-specific AprilTagimplementation into
rcs-corewould instead add calibration dependencies toevery core installation. Explicit strategy injection keeps the hardware
extensions independent and uses the calibration protocol RCS already exposes.
Design
default_zed(name2id, calibration_strategy=None)now forwards the optionalmapping directly to
ZEDCameraSet. The camera set already creates oneDummyCalibrationStrategyper camera when the mapping is omitted.Applications that need measured extrinsics can pass any implementation of
rcs.camera.hw.CalibrationStrategy. Mapping keys correspond to the logicalcamera names in
name2id.Because no code in
rcs_zedusespupil_apriltagsordiskcacheafter thecross-extension import is removed, those requirements are also removed from the
wheel metadata.
Testing
ModuleNotFoundError: No module named 'rcs_realsense'module is needed, default dummy calibration, custom strategy injection, and
Nonehandlingpython -m build --wheel --outdir /tmp/rcs-zed-pr-dist extensions/rcs_zed— passedrcs-core>=0.7.2,opencv-python~=4.10.0, andtyper~=0.9isort --check-onlyon changed Python files — passedblack --checkon changed Python files — passedruff checkon changed Python files — passedpython -m py_compileon changed Python files — passedgit diff --check— passedThe complete ZED extension test file was not run locally because published
rcs-core==0.7.2wheels are Linux x86_64-only, while this development host ismacOS arm64. The repository tests are included for the Linux CI environment.
Compatibility and risks
The helper's original one-argument call remains valid, and
default_zed_dummy_calibration()retains its signature and behavior.The intentional behavior correction is that
default_zed()no longer silentlyselects the FR3-base RealSense calibration. Callers relying on that undeclared
cross-extension behavior must pass their desired calibration strategy
explicitly. This is documented in both the extension README and the published
ZED documentation.
Scope
This PR does not move a robot-specific AprilTag calibration into core, duplicate
that implementation in the ZED extension, or add a new shared calibration
package. Those are broader architecture choices and are not required to restore
standalone installation.
Closes #287