apollo
apollo copied to clipboard
Perception: incorrect cast from float to boolean for filter_high_z_points_ in pointcloud_preprocessor
Describe the bug
Here is the code snippet which show the problem:
class PointCloudPreprocessor {
...
bool filter_high_z_points_ = true;
...
}; // class PointCloudPreprocessor
bool PointCloudPreprocessor::Init(
const PointCloudPreprocessorInitOptions& options) {
...
filter_high_z_points_ = static_cast<float>(config.filter_high_z_points());
...
}
A sample config file for pointcloud_preprocessor.conf:
filter_naninf_points: false
filter_nearby_box_points: true
box_forward_x: 2.0
box_backward_x: -2.0
box_forward_y: 3.0
box_backward_y: -5.0
filter_high_z_points: false
z_threshold: 5.0
Hi @jilinzhou , thank you for reporting the bug. We have fixed it already. Thanks for your interests in Apollo.
Fixed with #11578