Skip to content

Commit

Permalink
fix build error at galactic enviroment
Browse files Browse the repository at this point in the history
Signed-off-by: scepter914 <scepter914@gmail.com>
  • Loading branch information
scepter914 committed Nov 24, 2022
1 parent eb8ce30 commit b53d591
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ bool update_param(

pcl::PointXYZI getPointXYZI(const radar_msgs::msg::RadarReturn & radar, float intensity)
{
pcl::PointXYZI point;
const float r_xy = radar.range * std::cos(radar.elevation);
const float x = r_xy * std::cos(radar.azimuth);
const float y = r_xy * std::sin(radar.azimuth);
const float z = radar.range * std::sin(radar.elevation);
return pcl::PointXYZI{x, y, z, intensity};
point.x = r_xy * std::cos(radar.azimuth);
point.y = r_xy * std::sin(radar.azimuth);
point.z = radar.range * std::sin(radar.elevation);
point.intensity = intensity;
return point;
}

pcl::PointCloud<pcl::PointXYZI> toAmplitudePCL(const radar_msgs::msg::RadarScan & radar_scan)
Expand Down

0 comments on commit b53d591

Please sign in to comment.