Browse Source

change detection_radar_sr308

yuchuli 1 year ago
parent
commit
334fba6931

+ 7 - 7
src/detection/detection_lidar_pointpillars_cuda/include/params.h

@@ -22,17 +22,17 @@ class Params
   public:
     static const int num_classes = 3;
     const char *class_name [num_classes] = { "Car","Pedestrian","Cyclist",};
-    const float min_x_range = -80;
-    const float max_x_range = 80;
-    const float min_y_range = -80;
-    const float max_y_range = 80;
+    const float min_x_range = -20.0;
+    const float max_x_range = 49.12;
+    const float min_y_range = -39.68;
+    const float max_y_range = 39.68;
     const float min_z_range = -3.0;
     const float max_z_range = 1.0;
     // the size of a pillar
-    const float pillar_x_size = 0.4;
-    const float pillar_y_size = 0.4;
+    const float pillar_x_size = 0.16;
+    const float pillar_y_size = 0.16;
     const float pillar_z_size = 4.0;
-    const int max_num_points_per_pillar = 16;
+    const int max_num_points_per_pillar = 32;
     const int num_point_values = 4;
     // the number of feature maps for pillar scatter
     const int num_feature_scatter = 64;

+ 1 - 1
src/detection/detection_lidar_pointpillars_cuda/main.cpp

@@ -139,7 +139,7 @@ void ListenPointCloud(const char * strdata,const unsigned int nSize,const unsign
         pdata[4*i + 0]= static_cast<float>(xp.x);
         pdata[4*i + 1]= static_cast<float>(xp.y);
         pdata[4*i + 2]= static_cast<float>(xp.z);
-        pdata[4*i + 3]= static_cast<float>(xp.intensity);
+        pdata[4*i + 3]= static_cast<float>(xp.intensity) *1.0/256.0 ;
 
 //        pdata[4*i + 0]= 0;
 //        pdata[4*i + 1]= 0;

+ 2 - 0
src/detection/detection_radar_conti_sr308/main.cpp

@@ -64,6 +64,8 @@ void ProcRadarMsg(iv::can::canraw xmsg)
         strdata[4] = 0x08;
         x.set_data(strdata,8);
         iv::can::canmsg xsend;
+        xsend.set_channel(0);
+        xsend.set_index(0);
         iv::can::canraw * praw = xsend.add_rawmsg();
         praw->CopyFrom(x);
         int nsize = xsend.ByteSize();