CameraZoomPlugin: support all camera-family sensor components - #167
Open
g-ampo wants to merge 1 commit into
Open
CameraZoomPlugin: support all camera-family sensor components#167g-ampo wants to merge 1 commit into
g-ampo wants to merge 1 commit into
Conversation
Extends PreUpdate's component lookup to accept BoundingBoxCamera, DepthCamera, RgbdCamera, SegmentationCamera, ThermalCamera and WideAngleCamera in addition to plain Camera. Fixes ArduPilot#129 and removes the same latent bug for every other camera variant.
g-ampo
force-pushed
the
fix/129-zoom-all-camera-types
branch
from
April 27, 2026 23:03
1bacecb to
3c3ff1b
Compare
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.
Fixes #129.
Problem
CameraZoomPlugin::PreUpdatelooked up onlycomponents::Cameraon the sensor entity, so the early-return fired for every other camera-family variant:boundingbox_camera,depth_camera,rgbd_camera,segmentation,thermal,wideanglecamera.Fix
Added
Impl::CameraSensorSdfhelper that fans out across the camera-family components and returns the matchedComponentTypeId.PreUpdateuses it for both lookup and_ecm.SetChanged(...).LogicalCamerais excluded (nosdf::Camera).Verification
Built against
gz-sim 8.11.0(Ubuntu 24.04). For each of 7 sensor types: minimal world +gz.msgs.Double{ data: 4.0 }on/model/cam_mount/sensor/camera/zoom/cmd_zoom. Pre-fix: onlycameraconverged torefHfov / zoom = 0.5 rad; others stayed at 2.0 rad. Post-fix: all 7 converge.Test fixture
Adds
tests/worlds/test_camera_zoom_boundingbox.sdfas in-tree reproducer for the bbox case.