From 446fa10899b2eca1a2d43b963d6629a8e497e235 Mon Sep 17 00:00:00 2001 From: Krzysztof Wojciechowski <49921081+Kotochleb@users.noreply.github.com> Date: Thu, 14 Mar 2024 02:57:46 +0100 Subject: [PATCH] Fix frames set to Name instead of FrameId for pointclouds (#417) Signed-off-by: Kotochleb --- src/DepthCameraSensor.cc | 2 +- src/GpuLidarSensor.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DepthCameraSensor.cc b/src/DepthCameraSensor.cc index 4f627ae6..21b0e330 100644 --- a/src/DepthCameraSensor.cc +++ b/src/DepthCameraSensor.cc @@ -309,7 +309,7 @@ bool DepthCameraSensor::Load(const sdf::Sensor &_sdf) // the xyz and rgb fields to be aligned to memory boundaries. This is need // by ROS1: https://github.com/ros/common_msgs/pull/77. Ideally, memory // alignment should be configured. - msgs::InitPointCloudPacked(this->dataPtr->pointMsg, this->Name(), true, + msgs::InitPointCloudPacked(this->dataPtr->pointMsg, this->FrameId(), true, {{"xyz", msgs::PointCloudPacked::Field::FLOAT32}, {"rgb", msgs::PointCloudPacked::Field::FLOAT32}}); diff --git a/src/GpuLidarSensor.cc b/src/GpuLidarSensor.cc index 09ce411e..31002712 100644 --- a/src/GpuLidarSensor.cc +++ b/src/GpuLidarSensor.cc @@ -134,7 +134,7 @@ bool GpuLidarSensor::Load(const sdf::Sensor &_sdf) // by ROS1: https://github.com/ros/common_msgs/pull/77. Ideally, memory // alignment should be configured. This same problem is in the // RgbdCameraSensor. - msgs::InitPointCloudPacked(this->dataPtr->pointMsg, this->Name(), true, + msgs::InitPointCloudPacked(this->dataPtr->pointMsg, this->FrameId(), true, {{"xyz", msgs::PointCloudPacked::Field::FLOAT32}, {"intensity", msgs::PointCloudPacked::Field::FLOAT32}, {"ring", msgs::PointCloudPacked::Field::UINT16}});