Skip to content

Commit

Permalink
Merge branch 'fix/remove_local_velodyne_msgs' of github.com:tier4/neb…
Browse files Browse the repository at this point in the history
…ula into fix/remove_local_velodyne_msgs
  • Loading branch information
drwnz committed Nov 16, 2023
2 parents 8281f56 + 83f088f commit 0d8f3e4
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 31 deletions.
6 changes: 3 additions & 3 deletions nebula_tests/hesai/hesai_ros_decoder_test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ struct HesaiRosDecoderTestParams
{
std::string sensor_model;
std::string return_mode;
std::string frame_id = "hesai";
double scan_phase = 0.;
std::string calibration_file = "";
std::string correction_file = "";
std::string bag_path;
std::string correction_file = "";
std::string frame_id = "hesai";
double scan_phase = 0.;
std::string storage_id = "sqlite3";
std::string format = "cdr";
std::string target_topic = "/pandar_packets";
Expand Down
58 changes: 30 additions & 28 deletions nebula_tests/hesai/hesai_ros_decoder_test_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,40 +19,42 @@ namespace test
{

const nebula::ros::HesaiRosDecoderTestParams TEST_CONFIGS[6] = {
{.sensor_model = "Pandar40P",
.return_mode = "Dual",
.calibration_file = "Pandar40P.csv",
.bag_path = "40p/1673400149412331409"},
{
.sensor_model = "Pandar64",
.return_mode = "Dual",
.calibration_file = "Pandar64.csv",
.bag_path = "64/1673403880599376836",
"Pandar40P",
"Dual",
"Pandar40P.csv",
"40p/1673400149412331409",
},
{
.sensor_model = "PandarAT128",
.return_mode = "LastStrongest",
.calibration_file = "PandarAT128.csv",
.correction_file = "PandarAT128.dat",
.bag_path = "at128/1679653308406038376",
"Pandar64",
"Dual",
"Pandar64.csv",
"64/1673403880599376836",
},
{
.sensor_model = "PandarQT64",
.return_mode = "Dual",
.calibration_file = "PandarQT64.csv",
.bag_path = "qt64/1673401195788312575",
"PandarAT128",
"LastStrongest",
"PandarAT128.csv",
"at128/1679653308406038376",
"PandarAT128.dat",
},
{
.sensor_model = "PandarXT32",
.return_mode = "Dual",
.calibration_file = "PandarXT32.csv",
.bag_path = "xt32/1673400677802009732",
"PandarQT64",
"Dual",
"PandarQT64.csv",
"qt64/1673401195788312575",
},
{
.sensor_model = "PandarXT32M",
.return_mode = "LastStrongest",
.calibration_file = "PandarXT32M.csv",
.bag_path = "xt32m/1660893203042895158",
"PandarXT32",
"Dual",
"PandarXT32.csv",
"xt32/1673400677802009732",
},
{
"PandarXT32M",
"LastStrongest",
"PandarXT32M.csv",
"xt32m/1660893203042895158",
}};

// Compares geometrical output of decoder against pre-recorded reference pointcloud.
Expand All @@ -66,7 +68,7 @@ TEST_P(DecoderTest, TestPcd)
int check_cnt = 0;

auto scan_callback = [&](
uint64_t msg_timestamp, uint64_t scan_timestamp,
uint64_t msg_timestamp, uint64_t /*scan_timestamp*/,
nebula::drivers::NebulaPointCloudPtr pointcloud) {
if (!pointcloud) return;

Expand Down Expand Up @@ -97,7 +99,7 @@ TEST_P(DecoderTest, TestTimezone)
std::vector<uint64_t> decoded_timestamps;

auto scan_callback = [&](
uint64_t msg_timestamp, uint64_t scan_timestamp,
uint64_t /*msg_timestamp*/, uint64_t scan_timestamp,
nebula::drivers::NebulaPointCloudPtr pointcloud) {
if (!pointcloud) return;
decoded_timestamps.push_back(scan_timestamp);
Expand Down Expand Up @@ -133,7 +135,7 @@ TEST_P(DecoderTest, TestTimezone)
// then compare e.g. the last timestamp to verify that it is not affected
// by timezone settings
ASSERT_EQ(decoded_timestamps.size(), decoded_timestamps_cmp.size());
ASSERT_GT(decoded_timestamps.size(), 0);
ASSERT_GT(decoded_timestamps.size(), 0U);
EXPECT_EQ(decoded_timestamps.back(), decoded_timestamps_cmp.back());
}

Expand Down

0 comments on commit 0d8f3e4

Please sign in to comment.