MOLAorg / mola_lidar_odometry

MOLA LiDAR odometry and localization
https://docs.mola-slam.org
GNU General Public License v3.0
37 stars 1 forks source link

ros2 launch of mola_lidar_odometry fails #4

Closed sreevan closed 1 month ago

sreevan commented 1 month ago

mola-cli is failing to launch in ros2 and i am unable to find the reason for this. All i get is the error as in the screenshot and i have tried searching for any log of the error but could not find any. Can i please request help to identify the cause of this problem and i am sure it would be something to fix in my machine. Also, rarely it does launch successfully and molaviz pops up with the right scan and map display.

Screenshot 2024-09-27 at 9 49 51 pm
jlblancoc commented 1 month ago

I guess your arch is arm64, right? (run uname --machine) It also looks like you have compiled everything from sources... have you tried installing via "apt", just for testing? Or is that not possible on your Jetson?

The only way I think of to find out more details, is to build with debug info:

colcon build --symlink-install  --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo

then enable core dumps, and after the crash, run coredump gdb and run bt to see where is actually happening the crash.

You can also run mp2p_icp unit tests just to verify that part is not the problem:

cd ros2_ws
. install/setup.bash 
cd build/mp2p_icp/ && make test
sreevan commented 1 month ago

Thanks for the response. Yes it is aarch64 Jetson Tx2. I am unable apt install or use rosdep since i have built almost everything from sources (opencv, gtsam, boost, tbb etc) including ros2. Many libraries do not offer nightly builds for this cpu architecture.

I had built mola exactly like as you advice

colcon build --symlink-install  --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo

and was trying to get the backtrace but for the life of me could not get the coredump using gdb from ros2 launch with bt always saying no stack.

When i run

mola-cli --ros-args /media/nvidia/Expansion/sources/ros2_humble/install/mola_lidar_odometry/share/mola_lidar_odometry/mola-cli-launchs/lidar_odometry_ros2.yaml

or when i run

ros2 launch mola_lidar_odometry ros2-lidar-odometry.launch.py lidar_topic_name:=/scan_cloud

prior to starting other nodes then it works mostly and fails sometimes.

And, all of the mp2p_icp tests passed

Screenshot 2024-09-28 at 11 53 59 am

-------Update------- After running the mola-cli a few times i got this

Screenshot 2024-09-28 at 12 58 07 pm

Also, the failures are more with lidar2d.yaml than lidar3d-default.yaml, which works almost everytime when i keep the sequence of start mola-lo in a separate terminal and then come & start other nodes in a different terminal.

-------Update 2------- After some googling and trial & error, was able to generate the stack trace as below but could still not figure out what the issue is. Please help!

Screenshot 2024-09-28 at 6 42 17 pm
jlblancoc commented 1 month ago

Thanks, that last call stack was really clarifying (once analyzed carefully...).

I think it's fixed now after this commit: https://github.com/MOLAorg/mola/commit/f4340c6572fadf353f16cfd0522e88c3a0b43ecc Please, update that repo (MOLAorg/mola), rebuild, and re-test it...

sreevan commented 1 month ago

thanks very much jiblancoc, quickest response i have ever had for any issue. That fix worked and mola-cli node within my launch file is working well.