Skip to content

Commit

Permalink
Fat finger on 3d point packing
Browse files Browse the repository at this point in the history
  • Loading branch information
treideme committed Feb 1, 2024
1 parent 7d7b509 commit 51f729e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bottlenose_camera_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1059,8 +1059,8 @@ void CameraDriver::publish_pointcloud(const pointcloud_t &pointcloud, const uint
for(size_t i = 0; i < pointcloud.count; i++) {
// Copy data into cloud_msg.data
std::memcpy(&msg.data[i * msg.point_step + x_field.offset], &pointcloud.points[i].x, sizeof(float));
std::memcpy(&msg.data[i * msg.point_step + y_field.offset], &pointcloud.points[i].x, sizeof(float));
std::memcpy(&msg.data[i * msg.point_step + z_field.offset], &pointcloud.points[i].x, sizeof(float));
std::memcpy(&msg.data[i * msg.point_step + y_field.offset], &pointcloud.points[i].y, sizeof(float));
std::memcpy(&msg.data[i * msg.point_step + z_field.offset], &pointcloud.points[i].z, sizeof(float));
// std::memcpy(&msg.data[i * msg.point_step + intensity_field.offset], &intensity, sizeof(float));
}
msg.header.frame_id = this->get_parameter("frame_id").as_string();
Expand Down

0 comments on commit 51f729e

Please sign in to comment.