Open
Conversation
Tests that instantiate PhotoneoBackend were failing when the harvesters SDK is not installed because HARVESTERS_AVAILABLE was set to False at module import time. Patch the flag to True and provide a mock CTI path so tests can run without the SDK, matching the pattern used by the Basler backend tests with PYPYLON_AVAILABLE.
Expand MockPhotoneoBackend to mirror the full PhotoneoBackend interface: - Add all 16 individual get/set config pairs (exposure, LED/laser power, coding strategy/quality, operation mode, trigger mode, etc.) - Add bulk get_configuration/set_configuration and get_capabilities - Add connection guard (_check_open) and proper lifecycle methods - Add organized section headers for readability This enables realistic offline testing and development without hardware.
….open()
Allow opening mock scanners via name parsing:
- AsyncScanner3D.open("MockPhotoneo") — first mock device
- AsyncScanner3D.open("MockPhotoneo:MOCK002") — specific serial
Add _known_backends set to correctly route bare backend names without
the "Backend:serial" colon separator.
…rm install The setup script was broken: downloads failed due to HTTP 302 redirects, env vars weren't set post-install, macOS was missing, and CTI detection was inconsistent between .cti and .so file variants. Fixes: - Use assets-2.balluff.com directly (skip redirect from static.matrix-vision.com) - Add _download_file() helper with urllib.request.urlopen, retry, and progress - Add _run_command() helper with logging - Unify CTI detection in get_cti_path() across .cti/.so variants and env vars - Set GENICAM_GENTL64_PATH for current session after install - Generate setup_photoneo_env.sh for persistent env configuration - Add full macOS support (DMG mount/install/unmount) - Improve Windows install with admin privilege check/elevation - Improve Windows uninstall with uninstaller search + wmic fallback - Handle non-zero installer exit from optional components (e.g. kernel modules) gracefully — verify CTI presence instead of failing immediately
Add scanners_3d/README.md covering architecture, usage (async/sync/mock), backends (Photoneo + MockPhotoneo), all 22 configuration parameters, service endpoints, SDK setup, point cloud generation, and extension guide. Update hardware README: - Add mindtrace-scanner-photoneo install to SDK setup sections - Fix capture modality data shapes (Range is (H,W) not (H,W,3), etc.) - Add Supported Backends table with MockPhotoneo for testing - Link to new scanners_3d README instead of services README - Add PhoXi 3D Scanner models to tested hardware list
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.
Add 3D scanner subsystem with Photoneo backend
Scope and Motivation
The hardware module supports 2D cameras, stereo cameras, PLCs, and sensors — but has no support for structured-light 3D scanners. Industrial inspection workflows require high-resolution 3D scanning (Photoneo PhoXi, MotionCam-3D) for dimensional measurement, surface defect detection, and bin picking.
This PR adds a complete 3D scanner subsystem following the same layered architecture as the existing subsystems: Backend → Core → Service → CLI.
Changes Included
Backend layer
Scanner3DBackend— abstract async base class with multi-component capture, point cloud generation, configuration, and thread-affinity supportPhotoneoBackend— production backend using Harvesters/GigE Vision with Matrix Vision mvGenTL Producer. Supports Range, Intensity, Confidence, Normals, and Color capture components, plus Coord3D point cloud generationMockPhotoneoBackend— full-fidelity mock for development and CI. Two simulated devices (PhoXi M and L) generating synthetic scan data without any hardware dependencyCore layer
AsyncScanner3D/Scanner3D— async and sync high-level interfaces with factory methodopen("Photoneo:serial")for backend routingScanResult,PointCloudData,CoordinateMap,ScannerConfiguration,ScannerCapabilitiesand configuration enumsService layer
SDK setup (
mindtrace-scanner-photoneo)GENICAM_GENTL64_PATH)CLI
mindtrace-hw scanner start/stop/status/logsfor service lifecycleStereo refactor
StereoCameraBackendbase class fromBaslerStereoAceto enable future stereo backendsTests & docs
scanners_3d/README.mdwith architecture, usage, configuration reference, and extension guidehardware/README.mdwith scanner setup commands and backend infoHow to Test
1. Install the OS-level SDK (Matrix Vision mvGenTL Producer — requires sudo):
2. Install Python dependencies:
3. Verify everything is wired up:
4. Discover scanners on the network (if hardware is available):
5. Try a capture (works without hardware using the mock backend):
Impact
scanners-allextra in pyproject.tomlmindtrace-scanner-photoneoregistered in pyproject.toml