Commit 3489729 1 parent f4add9a commit 3489729 Copy full SHA for 3489729
File tree 1 file changed +18
-2
lines changed
nebula_decoders/include/nebula_decoders/nebula_decoders_hesai/decoders
1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 14
14
15
15
#pragma once
16
16
17
+ #include " nebula_decoders/nebula_decoders_hesai/decoders/angle_corrector.hpp"
17
18
#include " nebula_decoders/nebula_decoders_hesai/decoders/hesai_packet.hpp"
18
19
#include " nebula_decoders/nebula_decoders_hesai/decoders/hesai_scan_decoder.hpp"
19
20
@@ -159,6 +160,23 @@ class HesaiDecoder : public HesaiScanDecoder
159
160
}
160
161
}
161
162
163
+ CorrectedAngleData corrected_angle_data =
164
+ angle_corrector_.getCorrectedAngleData (raw_azimuth, channel_id);
165
+
166
+ {
167
+ auto min_angle = deg2rad (sensor_configuration_->cloud_min_angle );
168
+ auto max_angle = deg2rad (sensor_configuration_->cloud_max_angle );
169
+ const auto & azimuth = corrected_angle_data.azimuth_rad ;
170
+
171
+ bool inside_fov =
172
+ (min_angle <= azimuth && azimuth <= max_angle) ||
173
+ ((max_angle < min_angle) && (azimuth <= max_angle || min_angle <= azimuth));
174
+
175
+ if (!inside_fov) {
176
+ continue ;
177
+ }
178
+ }
179
+
162
180
NebulaPoint point;
163
181
point.distance = distance;
164
182
point.intensity = unit.reflectivity ;
@@ -168,8 +186,6 @@ class HesaiDecoder : public HesaiScanDecoder
168
186
point.return_type = static_cast <uint8_t >(return_type);
169
187
point.channel = channel_id;
170
188
171
- auto corrected_angle_data = angle_corrector_.getCorrectedAngleData (raw_azimuth, channel_id);
172
-
173
189
// The raw_azimuth and channel are only used as indices, sin/cos functions use the precise
174
190
// corrected angles
175
191
float xyDistance = distance * corrected_angle_data.cos_elevation ;
You can’t perform that action at this time.
0 commit comments