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}});