Skip to content

Commit

Permalink
ROS 2: depth_image_proc/point_cloud_xyzi_radial Add intensity convers…
Browse files Browse the repository at this point in the history
…ion (copy) for float

Signed-off-by: Alejandro Hernández Cordero <[email protected]>
  • Loading branch information
ahcorde committed Jan 19, 2024
1 parent 5645baa commit ebaed94
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 @@ -205,6 +205,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 @@ -145,6 +145,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 ebaed94

Please sign in to comment.