Open lukasj-imar opened 1 year ago
Hi I might be ran into same issue as you. My LIOSAM on ROS1 runs fine, but on the same setup, the ROS2 branch runs like: https://github.com/TixiaoShan/LIO-SAM/issues/346 Also, I've debugged the code and I've seen although ros2 topic delay of the pointcloud topic are at around 10hz. but in the Lidarpointcloud handler(the pointcloud callback function), the process of pointcloud are real quick(0.xms), but pointcloud come in slow, it runs(the frequency that the handler invoked) around 7-9hz, sometimes 6hz.
Would you mind tell me how to switch generic kernel to a lowlatency-kernel and disabled switching-ability to high latency c-states by setting a kernel boot parameter to ``ìdle=halt```? Or any I could refer?
Much appreciated!
Hi @chivas1000,
sorry for my late response. Here are the steps you need to follow:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=ht idle=halt intel_idle.max_cstate=0"
#<domain> <type> <item> <value> #
lukas - rtprio 98 lukas - nice -19 lukas - memlock -1
sudo update-grub
Hi everybody,
while testing ROS2-LIO-SAM on different machines, I encountered a problem related to the native high latency of the OS (Ubuntu 22.04 TLS, kernel: 5.19.0-45-generic).
As a result of the latency problem, LIO-SAM worked on one machine only with decreased replay rate of my own rosbags. On an other system (with much more powerfull hardware), I had no chance to run LIO-SAM at any speed. It seems that point clouds won't be processed fast enough, so no LiDAR-odometry solution can be calculated with the consequence that
imuPreintegration
drifts away after a few seconds.I fixed this problem by reducing the latency of the whole system. Therefor, I changed der generic kernel to a lowlatency-kernel and disabled switching-ability to high latency c-states by setting a kernel boot parameter to ``ìdle=halt```.
Now, ROS2-LIO-SAM seems to work pretty well and stable on all of my machines. If you have issues with respect to performance, check out this fix and give me a feedback.