Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

Commit

Permalink
removed redundant calls
Browse files Browse the repository at this point in the history
  • Loading branch information
exo-core committed Aug 25, 2022
1 parent 3e04c24 commit b5d4b80
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/k4a_ros_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -729,8 +729,6 @@ k4a_result_t K4AROSDevice::fillColorPointCloud(const k4a::image& pointcloud_imag

k4a_result_t K4AROSDevice::fillPointCloud(const k4a::image& pointcloud_image, sensor_msgs::PointCloud2Ptr& point_cloud)
{
point_cloud->height = pointcloud_image.get_height_pixels();
point_cloud->width = pointcloud_image.get_width_pixels();
point_cloud->is_dense = false;
point_cloud->is_bigendian = false;

Expand All @@ -745,7 +743,7 @@ k4a_result_t K4AROSDevice::fillPointCloud(const k4a::image& pointcloud_image, se

pcd_modifier.resize(point_count);

// Restore actual dimensions as pcd_modifier.resize(n) sets the cloud size to n x 1
// Set actual dimensions as pcd_modifier.resize(n) sets the cloud size to n x 1
point_cloud->height = pointcloud_image.get_height_pixels();
point_cloud->width = pointcloud_image.get_width_pixels();
point_cloud->row_step = pointcloud_image.get_width_pixels() * point_cloud->point_step;
Expand Down

0 comments on commit b5d4b80

Please sign in to comment.