Skip to content

Conversation

xndcn
Copy link

@xndcn xndcn commented Sep 9, 2025

When points is a structured NumPy array and point_step is not provided, create_cloud now defaults point_step to points.dtype.itemsize for convenience

See also #223

@xndcn
Copy link
Author

xndcn commented Sep 9, 2025

When points is structured NumPy array, the point_step of final PointCloud2 is directly derived from points.dtype.itemsize.
So in this condition, we need only to check fields if point_step is not provided, and that is why we can use points.dtype.itemsize by default.

@xndcn
Copy link
Author

xndcn commented Oct 3, 2025

ping, thanks

Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, this makes the API more intuitive while maintaining full backwards compatibility.

i would like to have an another review.

CC: @ahcorde @tfoote

@ahcorde
Copy link
Contributor

ahcorde commented Oct 6, 2025

Pulls: #295
Gist: https://gist.githubusercontent.com/ahcorde/5381216019e4a73fac86056c2f95850e/raw/9bf1e66a8150777e79a0534f06ce1a75dd48dd85/ros2.repos
BUILD args: --packages-above-and-dependencies sensor_msgs_py
TEST args: --packages-above sensor_msgs_py
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/17221

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

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.

3 participants