Skip to content

Commit

Permalink
fix ros1 wrapper too
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Dec 14, 2023
1 parent 8b5b45c commit 5aa971c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/ros1bridge/src/point_cloud2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,15 +261,15 @@ bool mrpt::ros1bridge::toROS(
const auto& xs = obj.getPointsBufferRef_x();
const auto& ys = obj.getPointsBufferRef_y();
const auto& zs = obj.getPointsBufferRef_z();
const auto& Is = obj.getPointsBufferRef_intensity();
const auto* Is = obj.getPointsBufferRef_intensity();

float* pointDest = reinterpret_cast<float*>(msg.data.data());
for (size_t i = 0; i < xs.size(); i++)
{
*pointDest++ = xs[i];
*pointDest++ = ys[i];
*pointDest++ = zs[i];
*pointDest++ = Is[i];
*pointDest++ = (*Is)[i];
}

return true;
Expand Down

0 comments on commit 5aa971c

Please sign in to comment.