Repository navigation
Push 4.59.2 release into ros2-master - #3596
Merged
Merged
Conversation
FW >= 7.58 + librealsense#15691 removed the 52-byte MAP1 header from the occupancy stream: the frame is now a bare signed-cell grid, and the grid geometry and signed origin travel in the UVC metadata ABI instead of a MAP1 sub-header. - publishOccupancyFrame: add a pure-payload path that reads cols/rows/ cell_size/origin from the occupancy frame metadata and copies the cells straight through (already in nav_msgs row-major order, no axis flip), publishing both ~/occupancy and ~/occupancy_certainty. - Remove publishOccupancyFromMap1, the occupancy_map1.h parser and its unit test, and the corresponding ament_add_gtest hook in CMakeLists. - Other-device legacy paths are left untouched. Validated live on D555 (FW 7.59.35.15855): occupancy 320x256, 81920-byte pure payload, resolution 0.05 m, origin (0, -6.4) sourced from metadata. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
When neither the pure-payload nor the legacy path can read the grid geometry (device/driver delivers no occupancy metadata, e.g. an unpatched uvcvideo on Linux that drops the vendor blob), the legacy path called get_frame_metadata() unguarded and librealsense threw on every frame. Guard on supports_frame_metadata(GRID_COLUMNS/ROWS) - matching the existing guarded readers in this file - and, when absent, drop the frame after an RCLCPP_ERROR_THROTTLE (5s, pointing at librealsense2-dkms). The 5s throttle matches the sibling occupancy-drop logs; no per-frame throw or log spam, but the cause stays visible in recent logs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Code review found two frames-that-partially-populate-metadata paths that could still throw rs2::error out of the streaming callback: - Pure-payload branch was gated only on ORIGIN_X/Y but then read COLUMNS/ROWS/CELL_SIZE unguarded. A frame advertising origin but not those would throw. Require all five metadata fields to enter the branch. - The metadata-missing guard checked COLUMNS/ROWS but not CELL_SIZE, while the legacy path reads CELL_SIZE unguarded. Add CELL_SIZE to the guard. Both cases now fall through to the throttled metadata-missing error and drop the frame instead of throwing per frame. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The pure-payload path's geometry validation (rows/cols positivity, size_t overflow, raw_size < n) and unit conversions were inline in publishOccupancyFrame with no unit coverage - the MAP1 tests deleted in this branch used to be the only occupancy-geometry tests. Extract them into occupancy::computeGeometry (header-only, free of ROS/SDK types, same pattern as splitCells) and cover with gtests: - valid 320x256 grid converts cm->m and mm->m correctly (the live D555 case) - non-positive dims and payload-smaller-than-grid are rejected - output is left untouched on failure publishOccupancyFrame now calls the helper; no behavior change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- computeGeometry now rejects a non-positive cell size (would publish resolution 0, a malformed OccupancyGrid) with a NonPositiveCellSize status; covered by a new unit test. - Move the pure-payload path out of publishOccupancyFrame into tryPublishPurePayloadOccupancy() so the frame handler is no longer one oversized function (234 -> 169 lines; the helper is self-contained). The pre-existing legacy paths are left untouched.
The MAP1 path validated a CRC-32 over the payload; the pure-payload path dropped that check. The FW now reports the same CRC-32/ISO-HDLC over the whole payload in RS2_FRAME_METADATA_CRC (confirmed on a live D555: metadata CRC matches the computed one on real frames). When RS2_FRAME_METADATA_CRC is supported, recompute it over the payload and drop the frame on mismatch (throttled warning). Skip the check when the metadata has no CRC. CRC helper is header-only and unit-tested (standard check value + single-byte corruption).
The drop warnings printed rows x cols, so a 320x256 grid logged as 256x320. The legacy path keeps rows x cols since its width is the firmware row count.
Co-authored-by: Nir Azkiel <nir.azkiel@realsenseai.com>
|
Hi @Nir-Az, Thank you for opening this PR! However, this PR targets
|
2 of 4 tasks
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.
Overview: Bring the frozen
r/4.59.2release branch intoros2-master, so the bloom tracks (version: :{auto},devel_branch: ros2-master) read 4.59.2 and the4.59.2tag can be created onros2-master.Why
The ROS wrapper is released from
ros2-master: bloom reads<version>fromros2-master'spackage.xml.ros2-masteris still at 4.59.1 (7a87097c).Summary
ros2-master(7a87097c) is already an ancestor ofr/4.59.2(28db0360): no conflicts, the result equalsr/4.59.2.Next (after merge)
catkin_generate_changelog+catkin_prepare_releaseonros2-master, tag4.59.2Test plan
git merge-base --is-ancestor origin/ros2-master origin/r/4.59.2package.xmlreports 4.59.2🤖 Generated with Claude Code