Skip to content

Commit

Permalink
Merge pull request #1848 from doronhi/ros2-fix-pc-size
Browse files Browse the repository at this point in the history
ROS2 - Fix pointcloud message size when no texture is added.
  • Loading branch information
doronhi authored May 5, 2021
2 parents 61e1a4b + 5864a4d commit 05e05a1
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion realsense2_camera/src/base_realsense_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2398,7 +2398,6 @@ void BaseRealSenseNode::publishPointCloud(rs2::points pc, const rclcpp::Time& t,
else
{
std::string format_str = "intensity";
_msg_pointcloud.point_step = addPointField(_msg_pointcloud, format_str.c_str(), 1, sensor_msgs::msg::PointField::FLOAT32, _msg_pointcloud.point_step);
_msg_pointcloud.row_step = _msg_pointcloud.width * _msg_pointcloud.point_step;
_msg_pointcloud.data.resize(_msg_pointcloud.height * _msg_pointcloud.row_step);

Expand Down

0 comments on commit 05e05a1

Please sign in to comment.