Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert: revert PR #6989 #7676

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion perception/image_projection_based_fusion/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ if(TRT_AVAIL AND CUDA_AVAIL AND CUDNN_AVAIL)

ament_auto_add_library(pointpainting_lib SHARED
src/pointpainting_fusion/node.cpp
src/pointpainting_fusion/pointcloud_densification.cpp
src/pointpainting_fusion/pointpainting_trt.cpp
src/pointpainting_fusion/voxel_generator.cpp
)
Expand Down

This file was deleted.

22 changes: 3 additions & 19 deletions ...sed_fusion/include/image_projection_based_fusion/pointpainting_fusion/voxel_generator.hpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,19 @@
#ifndef IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__VOXEL_GENERATOR_HPP_
#define IMAGE_PROJECTION_BASED_FUSION__POINTPAINTING_FUSION__VOXEL_GENERATOR_HPP_

#include <image_projection_based_fusion/pointpainting_fusion/pointcloud_densification.hpp>
#include <lidar_centerpoint/preprocess/pointcloud_densification.hpp>
#include <lidar_centerpoint/preprocess/voxel_generator.hpp>

#include <bitset>
#include <memory>
#include <vector>

namespace image_projection_based_fusion
{

class VoxelGenerator
class VoxelGenerator : public centerpoint::VoxelGenerator

Check warning on line 25 in perception/image_projection_based_fusion/include/image_projection_based_fusion/pointpainting_fusion/voxel_generator.hpp

View check run for this annotation

Codecov / codecov/patch

perception/image_projection_based_fusion/include/image_projection_based_fusion/pointpainting_fusion/voxel_generator.hpp#L25

Added line #L25 was not covered by tests
{
public:
explicit VoxelGenerator(
const centerpoint::DensificationParam & param, const centerpoint::CenterPointConfig & config);

bool enqueuePointCloud(
const sensor_msgs::msg::PointCloud2 & input_pointcloud_msg, const tf2_ros::Buffer & tf_buffer);

std::size_t generateSweepPoints(std::vector<float> & points);

protected:
std::unique_ptr<PointCloudDensification> pd_ptr_{nullptr};
using centerpoint::VoxelGenerator::VoxelGenerator;

Check warning on line 28 in perception/image_projection_based_fusion/include/image_projection_based_fusion/pointpainting_fusion/voxel_generator.hpp

View check run for this annotation

Codecov / codecov/patch

perception/image_projection_based_fusion/include/image_projection_based_fusion/pointpainting_fusion/voxel_generator.hpp#L28

Added line #L28 was not covered by tests

centerpoint::CenterPointConfig config_;
std::array<float, 6> range_;
std::array<int, 3> grid_size_;
std::array<float, 3> recip_voxel_size_;
std::size_t generateSweepPoints(std::vector<float> & points) override;
};
} // namespace image_projection_based_fusion

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,6 @@

namespace image_projection_based_fusion
{

VoxelGenerator::VoxelGenerator(
const centerpoint::DensificationParam & param, const centerpoint::CenterPointConfig & config)
: config_(config)
{
pd_ptr_ = std::make_unique<PointCloudDensification>(param);
range_[0] = config.range_min_x_;
range_[1] = config.range_min_y_;
range_[2] = config.range_min_z_;
range_[3] = config.range_max_x_;
range_[4] = config.range_max_y_;
range_[5] = config.range_max_z_;
grid_size_[0] = config.grid_size_x_;
grid_size_[1] = config.grid_size_y_;
grid_size_[2] = config.grid_size_z_;
recip_voxel_size_[0] = 1 / config.voxel_size_x_;
recip_voxel_size_[1] = 1 / config.voxel_size_y_;
recip_voxel_size_[2] = 1 / config.voxel_size_z_;
}

bool VoxelGenerator::enqueuePointCloud(
const sensor_msgs::msg::PointCloud2 & input_pointcloud_msg, const tf2_ros::Buffer & tf_buffer)
{
return pd_ptr_->enqueuePointCloud(input_pointcloud_msg, tf_buffer);
}

size_t VoxelGenerator::generateSweepPoints(std::vector<float> & points)
{
Eigen::Vector3f point_current, point_past;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@
#ifndef LIDAR_CENTERPOINT__CENTERPOINT_TRT_HPP_
#define LIDAR_CENTERPOINT__CENTERPOINT_TRT_HPP_

#include "lidar_centerpoint/cuda_utils.hpp"
#include "lidar_centerpoint/network/network_trt.hpp"
#include "lidar_centerpoint/postprocess/postprocess_kernel.hpp"
#include "lidar_centerpoint/preprocess/voxel_generator.hpp"
#include "pcl/point_cloud.h"
#include "pcl/point_types.h"

#include "sensor_msgs/msg/point_cloud2.hpp"
#include <lidar_centerpoint/cuda_utils.hpp>
#include <lidar_centerpoint/network/network_trt.hpp>
#include <lidar_centerpoint/postprocess/postprocess_kernel.hpp>
#include <lidar_centerpoint/preprocess/voxel_generator.hpp>

#include <sensor_msgs/msg/point_cloud2.hpp>

#include <pcl/point_cloud.h>
#include <pcl/point_types.h>

#include <memory>
#include <string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#ifndef LIDAR_CENTERPOINT__CUDA_UTILS_HPP_
#define LIDAR_CENTERPOINT__CUDA_UTILS_HPP_

#include "cuda_runtime_api.h"
#include <cuda_runtime_api.h>

#include <memory>
#include <sstream>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

#include <Eigen/Core>

#include "autoware_perception_msgs/msg/detected_object_kinematics.hpp"
#include "autoware_perception_msgs/msg/detected_objects.hpp"
#include "autoware_perception_msgs/msg/object_classification.hpp"
#include "autoware_perception_msgs/msg/shape.hpp"
#include <autoware_perception_msgs/msg/detected_object_kinematics.hpp>
#include <autoware_perception_msgs/msg/detected_objects.hpp>
#include <autoware_perception_msgs/msg/object_classification.hpp>
#include <autoware_perception_msgs/msg/shape.hpp>

#include <vector>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#ifndef LIDAR_CENTERPOINT__NETWORK__NETWORK_TRT_HPP_
#define LIDAR_CENTERPOINT__NETWORK__NETWORK_TRT_HPP_

#include "lidar_centerpoint/centerpoint_config.hpp"
#include "lidar_centerpoint/network/tensorrt_wrapper.hpp"
#include <lidar_centerpoint/centerpoint_config.hpp>
#include <lidar_centerpoint/network/tensorrt_wrapper.hpp>

#include <vector>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#ifndef LIDAR_CENTERPOINT__NETWORK__SCATTER_KERNEL_HPP_
#define LIDAR_CENTERPOINT__NETWORK__SCATTER_KERNEL_HPP_

#include "cuda.h"
#include "cuda_runtime_api.h"
#include <cuda.h>
#include <cuda_runtime_api.h>

namespace centerpoint
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
#ifndef LIDAR_CENTERPOINT__NETWORK__TENSORRT_WRAPPER_HPP_
#define LIDAR_CENTERPOINT__NETWORK__TENSORRT_WRAPPER_HPP_

#include "NvInfer.h"
#include "lidar_centerpoint/centerpoint_config.hpp"
#include "tensorrt_common/tensorrt_common.hpp"
#include <lidar_centerpoint/centerpoint_config.hpp>
#include <tensorrt_common/tensorrt_common.hpp>

#include <NvInfer.h>

#include <iostream>
#include <memory>
Expand All @@ -31,7 +32,7 @@ class TensorRTWrapper
public:
explicit TensorRTWrapper(const CenterPointConfig & config);

virtual ~TensorRTWrapper();
~TensorRTWrapper();

bool init(
const std::string & onnx_path, const std::string & engine_path, const std::string & precision);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
#ifndef LIDAR_CENTERPOINT__NODE_HPP_
#define LIDAR_CENTERPOINT__NODE_HPP_

#include "lidar_centerpoint/centerpoint_trt.hpp"
#include "lidar_centerpoint/detection_class_remapper.hpp"
#include "lidar_centerpoint/postprocess/non_maximum_suppression.hpp"

#include <autoware/universe_utils/ros/debug_publisher.hpp>
#include <autoware/universe_utils/ros/published_time_publisher.hpp>
#include <autoware/universe_utils/system/stop_watch.hpp>
#include <lidar_centerpoint/centerpoint_trt.hpp>
#include <lidar_centerpoint/detection_class_remapper.hpp>
#include <rclcpp/rclcpp.hpp>

#include <autoware_perception_msgs/msg/detected_object_kinematics.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
#ifndef LIDAR_CENTERPOINT__POSTPROCESS__CIRCLE_NMS_KERNEL_HPP_
#define LIDAR_CENTERPOINT__POSTPROCESS__CIRCLE_NMS_KERNEL_HPP_

#include "lidar_centerpoint/utils.hpp"
#include "thrust/device_vector.h"
#include <lidar_centerpoint/utils.hpp>

#include <thrust/device_vector.h>

namespace centerpoint
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
#ifndef LIDAR_CENTERPOINT__POSTPROCESS__POSTPROCESS_KERNEL_HPP_
#define LIDAR_CENTERPOINT__POSTPROCESS__POSTPROCESS_KERNEL_HPP_

#include "cuda.h"
#include "cuda_runtime_api.h"
#include "lidar_centerpoint/centerpoint_config.hpp"
#include "lidar_centerpoint/utils.hpp"
#include "thrust/device_vector.h"
#include <lidar_centerpoint/centerpoint_config.hpp>
#include <lidar_centerpoint/utils.hpp>

#include <cuda.h>
#include <cuda_runtime_api.h>
#include <thrust/device_vector.h>

#include <vector>

Expand Down
Loading
Loading