Open Chiyo-no-sake opened 2 years ago
If there is a 100% CPU usage issue, see this:
High CPU Usage (100% all cores/threads): Most of the cases, this is related to OpenMP, try setting environment variable OMP_WAIT_POLICY to passive.
Otherwise, when it is lost, to recover follow instructions here: https://github.com/introlab/rtabmap/wiki/Kinect-mapping#lost-odometry-red-screens
It's not a 100% CPU usage issue, however I tried setting the env var to passive but it doesn't work either, the problem of the 5+ minutes freeze still remains. It seems that the software is taking a lot of time to do some computation that is causing the freeze. Moreover, when the system comes back alive, as soon as I try to recover odometry by positioning near the last "good" frame, it freezes again.
Here is the config file I used and a video demonstrating the issue with IR mode enabled. As you can see from the video, CPU is not saturated (only 200-300% on 8-cores) and as soon as the odometry recovers, the system freezes again.
Demonstration Video: https://imgur.com/a/bJhxGRr Config File: https://pastebin.com/GSLp80by
I reproduced the same thing with your config file. Looking at the timing statistics, it was the occupancy grid creation that required a lot of time:
Do you need to occupancy grid? you can opt-out under Preferences->Local Occupancy Grid (first checkbox).
Note also that feeding the raw point cloud without decimation requires a lot of resources (for occupancy grid creation and for rendering). I suggest to downsample the depth image before creating the point cloud:
Then if you want to keep the occupancy grid, you may increase the cell size to 5 cm, and disable Ray tracing (though in your case ray tracing was ignored because rtabmap is not built with OctoMap):
With those changes, I get around 65 ms map updates (rtabmap using 15% cpu, peaks are when a loop closure is detected):
I'm trying to run mapping with rtabmap using only an Azure Kinect, but suddenly the mapping freezes for 5+ minutes before coming back to working (rtabmap has huge CPU load in the meanwhile). After un-freezing, the odometry is lost (as indicated by the red background) and an extreme amount of warnings gets logged:
I noticed that, if rtabmap is configured to use IR mode on the Kinect, the time it freezes during mapping reduces to 3-7 seconds, and warning are printed again but differently:
The configuration of the kinect in source tab is the following: RGB-D:
Odometry Sensor: None