forked from autowarefoundation/autoware_universe
-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathtest_voxel_generator.hpp
69 lines (54 loc) · 2.04 KB
/
test_voxel_generator.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// Copyright 2024 TIER IV, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef TEST_VOXEL_GENERATOR_HPP_
#define TEST_VOXEL_GENERATOR_HPP_
#include <lidar_centerpoint/preprocess/voxel_generator.hpp>
#include <rclcpp/rclcpp.hpp>
#include <sensor_msgs/msg/point_cloud2.hpp>
#include <gtest/gtest.h>
#include <memory>
#include <string>
#include <vector>
class VoxelGeneratorTest : public testing::Test
{
public:
void SetUp() override;
void TearDown() override;
// These need to be public so that they can be accessed in the test cases
rclcpp::Node::SharedPtr node_{};
std::unique_ptr<sensor_msgs::msg::PointCloud2> cloud1_{}, cloud2_{};
geometry_msgs::msg::TransformStamped transform1_{}, transform2_{};
std::unique_ptr<centerpoint::DensificationParam> densification_param_ptr_{};
std::unique_ptr<centerpoint::CenterPointConfig> config_ptr_{};
std::unique_ptr<tf2_ros::Buffer> tf2_buffer_{};
std::string world_frame_{};
std::string lidar_frame_{};
std::size_t points_per_pointcloud_{};
std::size_t capacity_{};
double delta_pointcloud_x_{};
std::size_t class_size_{};
float point_feature_size_{};
std::size_t cloud_capacity_{};
std::size_t max_voxel_size_{};
std::vector<double> point_cloud_range_{};
std::vector<double> voxel_size_{};
std::size_t downsample_factor_{};
std::size_t encoder_in_feature_size_{};
float score_threshold_{};
float circle_nms_dist_threshold_{};
std::vector<double> yaw_norm_thresholds_{};
bool has_variance_{};
cudaStream_t stream_{};
};
#endif // TEST_VOXEL_GENERATOR_HPP_