Skip to content

Commit

Permalink
[backport iron] ROS 2: depth_image_proc/point_cloud_xyzi_radial Add i…
Browse files Browse the repository at this point in the history
…ntensity conversion (copy) for float (#867) (#880)

Backport #867

Signed-off-by: Alejandro Hernández Cordero <[email protected]>
  • Loading branch information
ahcorde authored Jan 19, 2024
1 parent 0dfd862 commit f0090f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions depth_image_proc/src/point_cloud_xyzi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ void PointCloudXyziNode::imageCb(
convertIntensity<uint16_t>(intensity_msg, cloud_msg);
} else if (intensity_msg->encoding == enc::TYPE_16UC1) {
convertIntensity<uint16_t>(intensity_msg, cloud_msg);
} else if (intensity_msg->encoding == enc::TYPE_32FC1) {
convertIntensity<float>(intensity_msg, cloud_msg);
} else {
RCLCPP_ERROR(
get_logger(), "Intensity image has unsupported encoding [%s]",
Expand Down
2 changes: 2 additions & 0 deletions depth_image_proc/src/point_cloud_xyzi_radial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ void PointCloudXyziRadialNode::imageCb(
convertIntensity<uint16_t>(intensity_msg, cloud_msg);
} else if (intensity_msg->encoding == sensor_msgs::image_encodings::TYPE_16UC1) {
convertIntensity<uint16_t>(intensity_msg, cloud_msg);
} else if (intensity_msg->encoding == sensor_msgs::image_encodings::TYPE_32FC1) {
convertIntensity<float>(intensity_msg, cloud_msg);
} else {
RCLCPP_ERROR(
get_logger(), "Intensity image has unsupported encoding [%s]",
Expand Down

0 comments on commit f0090f8

Please sign in to comment.