Skip to content

Commit 301f42a

Browse files
committed
test(hesai): rewrite reference data to reflect edge effects of new scan cutting
The new scan cutting mechanism filters points based on the corrected angle. This changes the points contained/filtered out at the edges of the scan cut.
1 parent f0486bc commit 301f42a

7 files changed

+6
-2
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-240 Bytes
Binary file not shown.
Binary file not shown.

nebula_tests/hesai/hesai_ros_decoder_test_main.cpp

+6-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@
55
#include "hesai_common.hpp"
66
#include "hesai_ros_decoder_test.hpp"
77

8+
#include <pcl/impl/point_types.hpp>
89
#include <rclcpp/rclcpp.hpp>
910

1011
#include <gtest/gtest.h>
12+
#include <pcl/conversions.h>
13+
#include <pcl/io/pcd_io.h>
14+
#include <pcl/point_cloud.h>
1115

1216
#include <cstdlib>
1317
#include <ctime>
@@ -39,7 +43,7 @@ TEST_P(DecoderTest, TestPcd)
3943
rcpputils::fs::path bag_dir(hesai_driver_->params_.bag_path);
4044
rcpputils::fs::path pcd_dir = bag_dir.parent_path();
4145

42-
pcl::PointCloud<pcl::PointXYZ>::Ptr ref_pointcloud(new pcl::PointCloud<pcl::PointXYZ>);
46+
auto ref_pointcloud = std::make_shared<pcl::PointCloud<pcl::PointXYZ>>();
4347
int check_cnt = 0;
4448

4549
auto scan_callback = [&](
@@ -58,7 +62,7 @@ TEST_P(DecoderTest, TestPcd)
5862
checkPCDs(pointcloud, ref_pointcloud);
5963
check_cnt++;
6064
// ref_pointcloud.reset(new nebula::drivers::NebulaPointCloud);
61-
ref_pointcloud.reset(new pcl::PointCloud<pcl::PointXYZ>);
65+
ref_pointcloud = std::make_shared<pcl::PointCloud<pcl::PointXYZ>>();
6266
}
6367
};
6468

0 commit comments

Comments
 (0)