MaverickPeter / MR_SLAM

[IEEE T-RO 2023] A modularized multi-robot SLAM system with elevation mapping and a costmap converter for easy navigation. Different odometry and loop closure algorithms can be easily integrated into the system.
MIT License
266 stars 20 forks source link

Loop Detector Errors: DiSCO - No module named 'gputransform' & RING - Segmentation fault #6

Closed WilliamWoo45 closed 11 months ago

WilliamWoo45 commented 1 year ago

Hi @MaverickPeter,

Thanks for your pioneering work on multi-robot SLAM. I've successfully installed MR_SLAM on my laptop (Ubuntu 20.04, ROS Noetic), however there are some problems for both of the two loop detector modules as follows:

  1. For the DiSCO Loop Detector: have the module "gputransform" not found error. I checked and confirmed that the gputransform.cpython-38-x86_64-linux-gnu.so file is in the disco_ros directory. I also tried the python3 setup.py install command from DiSCO-pytorch. However, this error persists as shown in the figure below:

DiSCO_error

  1. For the RING Loop Detector: the Segmentation fault (core dumped) issue persists, even if I have changed the system stack size by ulimit -s 81920. The error message is shown below:

2023-04-07-MR_SLAM_RING-lc-failed

And the map in Rviz will not be loop closed or corrected, as can be seen in this video:

https://user-images.githubusercontent.com/43923666/230633552-a03a3617-3012-4106-9c0a-7c0194aec0d2.mp4

2023-04-07-main_SC-failed

So do you have any idea or suggestion for solving these issues? Thanks a lot and appreciate your early response.

Best Regards, William

MaverickPeter commented 1 year ago

Hi @WilliamWoo45, thanks for following our work. We only test our code on Ubuntu 18.04 with ROS melodic so something might be different. We will try to reproduce your problem by setting up the same environment; before that, you may try some solutions yourself.

  1. For the first question about DiSCO, you have to make sure that the Python version used in this workspace is the Python that you install the gputransformer.
  2. For the problem related to RING and SC, it might be something wrong with the fast_gicp, you may need to check the installation of fast_gicp using the test code in fast_gicp repo.
MaverickPeter commented 1 year ago

Hi @WilliamWoo45, it's weird. For RING, I just comment out the 'import open3d as o3d' in the util.py and everything goes well.

WilliamWoo45 commented 1 year ago

Hi @WilliamWoo45, it's weird. For RING, I just comment out the 'import open3d as o3d' in the util.py and everything goes well.

Hi @MaverickPeter,

Thanks for your prompt responses and actions :+1: ! It is indeed quite weird. I tried these solutions and confirmed that it works. So as a summary (at least from my side), in order to make RING or Scan Context-based method work, the following 3 steps should be conducted:

  1. After git clone https://github.com/MaverickPeter/MR_SLAM.git, make sure cd to /xxxx/LoopDetection/src/fast_gicp, then git clone https://github.com/SMRT-AIST/fast_gicp --recursive and install fast_gicp by executing python3 setup.py install --user
  2. Comment out the line import open3d as o3d in the util.py file.
  3. Use the command python3.8 main.py to launch the main file, since in my laptop both the python 3.10 and python 3.8 were installed and they seem to have some conflictions.

================================================================================================

For the DiSCO, I'm still fighting with the "gputransform" not found error. It seems that I should run the command python setup.py build_ext --inplace in the directory LoopDetection/src/disco_ros/tools/multi-layer-polar-cython/cython and generate a new gputransform.cpythonxxx.so file, and copy it to the main dir of disco_ros. However, there pops out another error saying that nvcc fatal: Value 'sm_30' is not defined for option 'gpu-architecture' (see below). nvcc_error

I briefly searched for this error and found that it maybe related to the CUDA version. It seems that CUDA has dropping out support for sm_30 since CUDA version 11. I will update you if I have further progresses.

================================================================================================

BTW, is it possible for you to share some simple bags file for full usage demo? I'm very looking forward to see how MR_SLAM really works.

Cheers :)

Best Regards, William

MaverickPeter commented 1 year ago

@WilliamWoo45 Thanks for your sharing. I'm preparing to update the instructions part of this repository.

For this error nvcc fatal: Value 'sm_30' is not defined for option 'gpu-architecture, you can simply comment out this line to solve it." https://github.com/MaverickPeter/MR_SLAM/blob/main/LoopDetection/src/disco_ros/tools/multi-layer-polar-cython/cython/setup.py#LL125C18-L125C29

As for the full usage demo, I'll upload and share it in an upcoming update.

WilliamWoo45 commented 1 year ago

Hi @MaverickPeter,

Thanks for your information. By commenting out the 'sm_30' related part, it indeed solves the error.

So for the DiSCO, the running steps are as follows:

  1. I run the command python setup.py build_ext --inplace in the directory LoopDetection/src/disco_ros/tools/multi-layer-polar-cython/cython and generate a new gputransform.cpythonxxx.so file, and copy it to the main dir of disco_ros.
  2. As mentioned in issue #5, remember to change one line in the file main.py from fitness = gicp.get_fitness_score(max_range=1.0) to fitness = gicp.get_fitness_score(1.0).
  3. In the main dir of disco_ros, run the command python3.8 main.py.

Looking forward to your early update for the full usage demo :+1: !

Best Regards, William

Arslan-Z commented 1 year ago

Looking forward to your updates for the full usage demo, thanks for the wonderful work!

WilliamWoo45 commented 1 year ago

Hi @MaverickPeter,

It's been a while since we discussed last time. May I kindly check with you, is there any update on the repository instructions and full usage demo?

Cheers.

Best Regards, William

MaverickPeter commented 11 months ago

The full usage demo has been released.