Browse Source

test lidar_centerpoint in agx orin, is ok. so review detection_lidar_centerpoint, find problem, fixing it , not complete.

yuchuli 10 months ago
parent
commit
76d3cc435b

+ 1 - 0
src/detection/detection_lidar_centerpoint/detection_lidar_centerpoint.pro

@@ -40,6 +40,7 @@ DISTFILES += \
 
 INCLUDEPATH += /usr/include/pcl-1.7
 INCLUDEPATH += /usr/include/pcl-1.8
+INCLUDEPATH += /usr/include/pcl-1.12
 INCLUDEPATH += /usr/include/eigen3
 INCLUDEPATH += /usr/include/opencv4
 

+ 4 - 4
src/detection/detection_lidar_centerpoint/include/lidar_centerpoint/cuda_utils.hpp

@@ -56,10 +56,10 @@ namespace cuda
 inline void check_error(const ::cudaError_t e, const char * f, int n)
 {
   if (e != ::cudaSuccess) {
-    std::stringstream s;
+    ::std::stringstream s;
     s << ::cudaGetErrorName(e) << " (" << e << ")@" << f << "#L" << n << ": "
       << ::cudaGetErrorString(e);
-    throw std::runtime_error{s.str()};
+    throw ::std::runtime_error{s.str()};
   }
 }
 
@@ -69,7 +69,7 @@ struct deleter
 };
 
 template <typename T>
-using unique_ptr = std::unique_ptr<T, deleter>;
+using unique_ptr = ::std::unique_ptr<T, deleter>;
 
 template <typename T>
 typename std::enable_if<std::is_array<T>::value, cuda::unique_ptr<T>>::type make_unique(
@@ -107,7 +107,7 @@ inline T * get_next_ptr(size_t num_elem, void *& workspace, size_t & workspace_s
 {
   size_t size = get_size_aligned<T>(num_elem);
   if (size > workspace_size) {
-    throw std::runtime_error("Workspace is too small!");
+    throw ::std::runtime_error("Workspace is too small!");
   }
   workspace_size -= size;
   T * ptr = reinterpret_cast<T *>(workspace);

+ 11 - 1
src/detection/detection_lidar_centerpoint/main.cpp

@@ -32,8 +32,13 @@ void init()
     const std::size_t point_feature_size =4;
     const std::size_t max_voxel_size =40000;
     std::vector<double> point_cloud_range ;
+    point_cloud_range.push_back(-76.8);point_cloud_range.push_back(-76.8);
+    point_cloud_range.push_back(-4.0);point_cloud_range.push_back(76.8);
+    point_cloud_range.push_back(76.8);point_cloud_range.push_back(6.0);
     std::vector<double>voxel_size ;
-    const std::size_t downsample_factor =2;
+    voxel_size.push_back(0.32);voxel_size.push_back(0.32);
+    voxel_size.push_back(10.0);
+    const std::size_t downsample_factor =1;
     const std::size_t encoder_in_feature_size = 9;
     std::vector<int64_t> allow_remapping_by_area_matrix;
     std::vector<double> min_area_matrix ;
@@ -114,6 +119,11 @@ void ListenPointCloud(const char * strdata,const unsigned int nSize,const unsign
 
 }
 
+void testdet()
+{
+
+}
+
 
 int main(int argc, char *argv[])
 {