Skip to content

[sensor_msgs] Fix row_step when resizing organized PointCloud2 - #340

Open
1visio wants to merge 1 commit into
ros2:rollingfrom
1visio:codex/common-interfaces-320
Open

[sensor_msgs] Fix row_step when resizing organized PointCloud2#340
1visio wants to merge 1 commit into
ros2:rollingfrom
1visio:codex/common-interfaces-320

Conversation

@1visio

@1visio 1visio commented Aug 17, 2026

Copy link
Copy Markdown

Fixes #320

PointCloud2Modifier::resize(width, height) reused the flat resize(size)
path, then updated width and height without recomputing row_step. This
left row_step equal to the total data size instead of one row's byte size.

Set row_step to width * point_step and add a regression test covering a
non-square organized cloud and its backing data size.

Validation:

  • git diff --check
  • ROS 2 tests not run locally because colcon and ros2 are unavailable.

@mergify

mergify Bot commented Aug 17, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug on PointCloud2Modifier::resize(uint32_t width, uint32_t height)

1 participant