glim icon indicating copy to clipboard operation
glim copied to clipboard

[ros2run]: Segmentation fault when segmenting specific green dots

Open Arik1to opened this issue 8 months ago • 2 comments

Describe the bug

Launched glim map_editor in docker image koide3/glim_ros2:humble_cuda12.2. Then following the guide Manual Object Removal, I selected the object (on the screenshot_02), segmented it and remove, selected the remaining green dots (on the screenshot_03) set the radius (as in the screenshot_03) and clicked segment, after which the interface closed and there was a [ros2run]: Segmentation fault in the terminal.

To Reproduce

  1. Launch map_editor: docker run \ -it \ --rm \ --net=host \ --ipc=host \ --pid=host \ --gpus all \ -e=DISPLAY \ -e=ROS_DOMAIN_ID \ -v $(realpath config):/glim/config \ -v home/user/inarimae_mmm:/glim/data \ koide3/glim_ros2:humble_cuda12.2 \ ros2 run glim_ros map_editor config_path:=/glim/config
  2. Clicked Open New Map and select dump_01, previously downloaded from Example dump data
  3. Right click a point on an object on the screenshot_02, Segmentation -> Select MinCut -> Adjust Foreground radius and Background radius, Click Segment, Remove selected points
  4. Right click a point on an remaining green dotss on the screenshot_03, Segmentation -> Select MinCut -> Adjust Foreground radius - 0.500 and Background radius - 0.510, Click Segment
  5. See [ros2run]: Segmentation fault in terminal

Expected behavior

The points were expected to be segmented

Screenshots

screenshot_01 Image screenshot_02 Image screenshot_03 Image screenshot_04 Image

Environment

  • CPU/GPU: Intel® Core™ i5-10400F × 12/NVIDIA GeForce RTX™ 4070
  • OS: Ubuntu 24.04
  • ROS: ROS2 humble
  • CUDA: CUDA 12.2
  • Build with CUDA: ON

Additional context Add any other context about the problem here.

Arik1to avatar Jun 10 '25 16:06 Arik1to

It didn't reproduce in my environment, but I guess there is an issue in the handling of isolated points in gtsam_points. I'll check the implementation to fix it.

koide3 avatar Jun 21 '25 04:06 koide3

I found and fixed a bug in the mincut implementation that causes segfaults when the size of the selected point cloud is too small: https://github.com/koide3/gtsam_points/pull/79

koide3 avatar Jun 21 '25 04:06 koide3