error: (-4:Insufficient memory) Failed to allocate 117635952038880 bytes in function 'OutOfMemoryError'
hi,everyone After successfully running roslaunch art_planner_ros art_planner.launch, I set a target point in RViz, and the terminal showed that the target point was received. However, the program then encountered the following error. Has anyone experienced this issue before?
Thank you all for your responses.
Error:
terminate called after throwing an instance of 'cv::Exception' what(): OpenCV(4.5.4) /home/ubuntu/build_opencv/opencv/modules/core/src/alloc.cpp:73: error: (-4:Insufficient memory) Failed to allocate 117635952038880 bytes in function 'OutOfMemoryError'
Hi @nanbwrn,
Are you by any chance using a very large and high resolution height map as input to the planner? OpenCV is only used for some height map processing. It tried to allocate 117TB of memory which most computers of course do not have :D
hi,@lorenwel In elevation_mapping_cupy, I set the height map resolution to 0.02m, and the resolution parameter in the planar segmentation is also 0.02m.
Could it be that this value is not set appropriately?
I'll adjust these parameters for now. I'll provide an update here if there's any progress.
Thank you all for your responses.
After attempting to modify the parameters, the error still occurs. After searching online, I suspect that the error is caused by conflicts between multiple OpenCV versions installed on the system.
The art_planner_ros on my computer is referencing these OpenCV libraries. I'm considering deleting a certain version to see if that fixes the issue. Could anyone let me know which version of OpenCV you're using? I'm really not sure what's causing the error. I ran the launch file in debug mode, but I couldn't find the cause of the error in the terminal.
libopencv_calib3d.so.4.2 => /lib/aarch64-linux-gnu/libopencv_calib3d.so.4.2 (0x0000ffff92950000)
libopencv_photo.so.4.2 => /lib/aarch64-linux-gnu/libopencv_photo.so.4.2 (0x0000ffff928a2000)
libopencv_features2d.so.410 => /usr/local/lib/libopencv_features2d.so.410 (0x0000ffff9258d000)
libopencv_core.so.4.2 => /lib/aarch64-linux-gnu/libopencv_core.so.4.2 (0x0000ffff92018000)
libopencv_imgproc.so.4.2 => /lib/aarch64-linux-gnu/libopencv_imgproc.so.4.2 (0x0000ffff91c74000)
libopencv_features2d.so.4.2 => /lib/aarch64-linux-gnu/libopencv_features2d.so.4.2 (0x0000ffff91b24000)
libopencv_flann.so.4.2 => /lib/aarch64-linux-gnu/libopencv_flann.so.4.2 (0x0000ffff91ac1000)
libopencv_flann.so.410 => /usr/local/lib/libopencv_flann.so.410 (0x0000ffff9171f000)
libopencv_imgproc.so.410 => /usr/local/lib/libopencv_imgproc.so.410 (0x0000ffff912ad000)
libopencv_core.so.410 => /usr/local/lib/libopencv_core.so.410 (0x0000ffff90c3a000)
libopencv_imgcodecs.so.4.2 => /lib/aarch64-linux-gnu/libopencv_imgcodecs.so.4.2 (0x0000ffff90bc8000)
libopencv_core.so.4.5 => /usr/lib/aarch64-linux-gnu/libopencv_core.so.4.5 (0x0000ffff9085d000)