Skip to content

Commit 7184305

Browse files
authored
Update CreatePointCloudMsg to add row_step (#47)
Signed-off-by: Jasmeet Singh <[email protected]>
1 parent 44b4be8 commit 7184305

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

RGLServerPlugin/src/Lidar.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ gz::msgs::PointCloudPacked RGLServerPluginInstance::CreatePointCloudMsg(std::chr
288288
*outMsg.mutable_header()->mutable_stamp() = gz::msgs::Convert(simTime);
289289
outMsg.set_height(1);
290290
outMsg.set_width(resultPointCloud.hitPointCount);
291+
outMsg.set_row_step(resultPointCloud.hitPointCount * outMsg.point_step());
291292

292293
gz::msgs::PointCloudPackedIterator<float> xIter(outMsg, "x");
293294
memcpy(&(*xIter), resultPointCloud.data.data(), resultPointCloud.hitPointCount * resultPointCloud.pointSize);

0 commit comments

Comments
 (0)