Browse Source

change detection_lidar_PointPillars_MultiHead. fix memory leak in this branch.

lijinliang 2 years ago
parent
commit
063ddc0b8f

+ 6 - 0
src/detection/detection_lidar_PointPillars_MultiHead/main.cpp

@@ -568,6 +568,12 @@ void DectectOnePCD(const pcl::PointCloud<pcl::PointXYZI>::Ptr &pc_ptr)
 
     iv::modulecomm::ModuleSendMsg(gpdetect,out.data(),out.length());
 
+    delete box_idx_of_points_cpu;
+
+    GPU_CHECK(cudaFree(dev_points));
+    GPU_CHECK(cudaFree(box_idx_of_points_gpu));
+    GPU_CHECK(cudaFree(boxes_gpu));
+
     //    givlog->verbose("lenth is %d",out.length());
 }
 

+ 1 - 0
src/detection/detection_lidar_PointPillars_MultiHead/pointpillars.cc

@@ -518,5 +518,6 @@ void PointPillars::DoInference(const float* in_points_array,
 //    }
 //    std::cout << "------------------------------------" << std::endl;
     cudaStreamDestroy(stream);
+    GPU_CHECK(cudaFree(dev_points));
 
 }

+ 1 - 0
src/detection/detection_lidar_PointPillars_MultiHead/postprocess.cu

@@ -512,5 +512,6 @@ void PostprocessCuda::DoPostprocessCuda(
 
         GPU_CHECK(cudaFree(dev_indexes));
         GPU_CHECK(cudaFree(dev_sorted_filtered_box));
+        GPU_CHECK(cudaFree(dev_sorted_filtered_scores));
     }
 }

+ 2 - 2
src/detection/detection_lidar_grid/percep_lidar_center.yaml

@@ -1,7 +1,7 @@
 SensorHeight : 1.8
 VehicleHeight : 2.1
-inputmemname : lidarpc_center
-outputmemname : lidar_obs_center
+inputmemname : lidar_pc
+outputmemname : lidar_obs
 skip_xmin : -0.9
 skip_xmax : 0.9
 skip_ymin : -2.3

+ 0 - 2
src/detection/detection_lidar_grid/perception_lidar_vv7.cpp

@@ -1,5 +1,3 @@
-
-
 #include <QCoreApplication>
 #include "perception_lidar_vv7.h"
 #include <getopt.h>

+ 1 - 1
src/detection/detection_lidar_ukf_pda/imm_ukf_pda.cpp

@@ -36,7 +36,7 @@ ImmUkfPda::ImmUkfPda()
     static_velocity_thres_ = 0.5;
     static_num_history_thres_ = 3;
     prevent_explosion_thres_ = 1000;
-    merge_distance_threshold_ = 0.5;
+    merge_distance_threshold_ = 0.8;
     use_sukf_ = false;
     use_vectormap_ = false;
     is_benchmark_ = false;

+ 2 - 2
src/driver/driver_lidar_rs32/lidar_driver_rs32.cpp

@@ -162,7 +162,7 @@ void processrs32_Data(QByteArray ba)
                 }
                 else
                 {
-                    std::cout<<"lidar_rs32 processrs32_Data data is very big gnRawPos = "<<gnRawPos<<std::endl;
+                    std::cout<<"lidar_rs32 processrs32_Data data is very big gnRawPos = "<<gnRawPos<<" now lidar angle: " << fAng<<std::endl;
                 }
             }
 
@@ -191,7 +191,7 @@ void rs32_Func(int n)
     std::cout<<"Enter rs32_Func."<<std::endl;
 
     QUdpSocket * udpSocket = new QUdpSocket( );
-    udpSocket->bind(QHostAddress(gstr_hostip), atoi(gstr_port));
+    udpSocket->bind(QHostAddress::Any, atoi(gstr_port));
 //    bool bbind = udpSocket->bind(QHostAddress("192.168.50.62"), 6699);
 //     bool bbind = udpSocket->bind(QHostAddress::Any, 6699);
 

+ 1 - 1
src/driver/driver_lidar_rs32/main.cpp

@@ -181,7 +181,7 @@ int main(int argc, char *argv[])
     snprintf(gstr_inclinationang_yaxis,255,"0");
     snprintf(gstr_hostip,255,"0.0.0.0");
     snprintf(gstr_port,255,"6699");
-    snprintf(gstr_yaml,255,"");
+    snprintf(gstr_yaml,255,argv[1]);
 
     int nRtn = GetOptLong(argc,argv);
     if(nRtn == 1)  //show help,so exit.

+ 15 - 0
src/fusion/fusion_pointcloud_bus/fusion_pointcloud_bus.yaml

@@ -1,7 +1,22 @@
 lidar:
+  - center
   - left
   - right
   - ignore
+center:
+  memname: lidar_pc
+  offset:
+    x: -1
+    y: 0
+    z: -1.0
+  maximum:
+    x: 100
+    y: 100.0
+    z: 100
+  minimum:
+    x: -100
+    y: -100.0
+    z: -100
 left:
   memname: lidarpc_left
   offset:

+ 1 - 1
src/tool/PerceptionShow/mainwindow.cpp

@@ -17,7 +17,7 @@
 #define VIEW_WIDTH 2000
 #define VIEW_HEIGHT 2000
 //ConsumerProducerQueue<cv::Mat> *imageBuffer = new ConsumerProducerQueue<cv::Mat>(1, true);
-std::string gstrperceptitle[] = {"lidar_pc","lidar_pointpillar","lidar_track","li_ra_fusion","obstacledata"};//{"image00","lidar_track","lidar_pc","lidar_pointpillar","radar","lidarobj","fusion","imgdet"};
+std::string gstrperceptitle[] = {"lidar_pc","lidar_pointpillar","obstacledata"};//{"image00","lidar_track","lidar_pc","lidar_pointpillar","radar","lidarobj","fusion","imgdet"};
 //std::string gstrperceptitle[] = {"image00","lidar","radar","fusion","lidarobj","imgdet"};
 //std::string gstrmemname[] = {"image00","lidarpc_center","radar","radafds","fusion"};
 std::string gstrmemname[] = {"image00","lidarpc_center","radar","fusion"};

+ 1 - 1
src/tool/adcndtmultimapping/main.cpp

@@ -29,7 +29,7 @@ int main(int argc, char *argv[])
 
    iv::xmlparam::Xmlparam xp(strpath.toStdString());
    gstrlidarmsg = xp.GetParam("msg","lidarpc_center");
-   gstrimumsg = xp.GetParam("gpsmsg","ins550d_gpsimu");
+   gstrimumsg = xp.GetParam("gpsmsg","hcp2_gpsimu");
     MainWindow w;
     w.show();
 

+ 1 - 1
src/tool/view_radar/ivradarview.h

@@ -5,7 +5,7 @@
 
 #include "radarobjectarray.pb.h"
 
-#define NUM_MAX_RADAR 6
+#define NUM_MAX_RADAR 1
 #define NUM_MAX_MSG 25
 class IVRadarView : public IVView
 {