KumarRobotics / sloam

Semantic LIDAR odometry and mapping for cylinderical objects (e.g. trees in forests)
Other
220 stars 31 forks source link

free(): invalid pointer ERROR #6

Open nvhungv2k opened 4 months ago

nvhungv2k commented 4 months ago

Hello everyone, I built SLOAM with debug option to debug it with GDB: catkin build -DCMAKE_BUILD_TYPE=Debug And then, I was running SLOAM on: ubuntu 20.04; ros noetic: roslaunch sloam run_sim.launch But when LiDAR information came up, it emitted the fatal error: free(): invalid pointer I debugged it with GDB by add launch-prefix="xterm -fa 'Monospace' -fs 14 -e gdb --args" to sloam node in sloam.launch as following: `...

...` Through debugging I found out, this error comes from Segmentation::run(..) function, at line 374, in [inference.cpp file](https://github.com/KumarRobotics/sloam/blob/60f6807001c45a1161b22b30e6951f268f70db4e/sloam/src/segmentation/inference.cpp#L374) it is so strange that ![image](https://github.com/KumarRobotics/sloam/assets/15605377/b10f1816-20aa-405c-8f85-5e3320628ac4) As above figure, when I am at line 445, only with command line: if(_verbose) the next line should has been line 446 (if _verbose is true) or 448 (end of run(..) function), but it is line 421 (marked red in figure) Continuing to debug, next line is decreasing (421 -> 420 -> ... -> 385), not increasing I still DID NOT figure out why the program run so
mycochang commented 4 months ago

what do the clouds look like for you when you save them as .pcd? I never hit that specific error... try writing some prints to check that the model tensor input dimensions match those of the cloud vector. as long as the stable_bdarknet.onnx and the zamboni.bag or whatever are still the same as in the OG branch, then you should be fine.

nvhungv2k commented 4 months ago

I converted pointcloud to *pcd and then viewed it using pcl_ros and pcl_viewer (a component of pcl-tools) respectively. The result is as follow: image As I described above, why the program Segmentation::run(..) function, at line 374, in inference.cpp file run decreasingly

mycochang commented 4 months ago
  1. use: https://www.cloudcompare.org/ for many reasons ;)

  2. hard to tell from only top-down-view but IMO your screenshot does NOT look like the VLP-16 used in run_sim inputs:

  3. I can confirm the current 404 status on the .onnx and .bag GDrive links. I don't think those files are mine to share, and I trust that the authors will handle it. I used a labeling tool and rangenet++ to make my own model, which you SHOULD do, for whatever LiDAR you will use in field applications, because:

  4. if anyone else reading/trying has already figured out how to make the inference.cpp &/ trellis.cpp more sensor-agnostic, let us know! :)

nvhungv2k commented 4 months ago
  1. Thanks for your sharing
  2. I think run_sim input can be any kind of LiDAR sensor (not necessarily is VLP-16), doesn't it? I do not see any snippet in SLOAM indicated that it fixed the kind of LiDAR, if any, please show me
  3. I already have been trying to create my own model. Firstly, I used semantickitti dataset as rangenet++. But with my current computer is RAM 32G, CPU 16 intel cores i7, GPU Nvidia Quadro T1000 4GB. As soon as running training, it overflowed RAM memory and then computer hang
  4. I hope anyone else already has done...