thien94 / orb_slam3_ros

A ROS implementation of ORB_SLAM3
GNU General Public License v3.0
261 stars 81 forks source link

[orb_slam3-2] process has died in jetson xavier nx melodic #27

Closed luminous-wu closed 7 months ago

luminous-wu commented 8 months ago

Hi, I tried to use your orb_slam3_ros code on a jetson xavier nx development board, catkin_make compiled successfully, but after using the roslaunch orb_slam3_ros tum_rgbd.launch command, the following errors occur: how can I fix them please?

[orb_slam3-2] process has died [pid 8623, exit code -11, cmd /home/robot/Desktop/motion_control/devel/lib/orb_slam3_ros/ros_rgbd /camera/rgb/ image_raw:=/camera/rgb/image_color /camera/depth_registered/image_raw:=/camera/depth/image __name:=orb_slam3 __log:=/home/robot/.ros/ log/849ed678-a6f1-11ee-9cd4-d8c0a650ee1f/orb_slam3-2.log].
log file: /home/robot/.ros/log/849ed678-a6f1-11ee-9cd4-d8c0a650ee1f/orb_slam3-2*.log

The full error message is as follows:

motion_control ➤ roslaunch orb_slam3_ros tum_rgbd.launch              git:main*
... logging to /home/robot/.ros/log/849ed678-a6f1-11ee-9cd4-d8c0a650ee1f/roslaunch-ubuntu-8587.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://192.168.200.155:37469/

SUMMARY
========

PARAMETERS
 * /orb_slam3/cam_frame_id: camera
 * /orb_slam3/enable_pangolin: True
 * /orb_slam3/settings_file: /home/robot/Deskt...
 * /orb_slam3/voc_file: /home/robot/Deskt...
 * /orb_slam3/world_frame_id: world
 * /orb_slam3_ros/trajectory_server_orb_slam3/source_frame_name: /camera
 * /orb_slam3_ros/trajectory_server_orb_slam3/target_frame_name: /world
 * /orb_slam3_ros/trajectory_server_orb_slam3/trajectory_publish_rate: 20.0
 * /orb_slam3_ros/trajectory_server_orb_slam3/trajectory_update_rate: 20.0
 * /rosdistro: melodic
 * /rosversion: 1.14.13
 * /use_sim_time: False

NODES
  /
    orb_slam3 (orb_slam3_ros/ros_rgbd)
    rviz (rviz/rviz)
  /orb_slam3_ros/
    trajectory_server_orb_slam3 (hector_trajectory_server/hector_trajectory_server)

auto-starting new master
process[master]: started with pid [8601]
ROS_MASTER_URI=http://192.168.200.155:11311

setting /run_id to 849ed678-a6f1-11ee-9cd4-d8c0a650ee1f
process[rosout-1]: started with pid [8620]
started core service [/rosout]
process[orb_slam3-2]: started with pid [8623]
process[rviz-3]: started with pid [8640]
process[orb_slam3_ros/trajectory_server_orb_slam3-4]: started with pid [8642]
[ INFO] [1703926679.606618797]: Waiting for tf transform data between frames /world and /camera to become available
[ INFO] [1703926680.919036007]: rviz version 1.13.30
[ INFO] [1703926680.919228220]: compiled against Qt version 5.9.5
[ INFO] [1703926680.919308242]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1703926680.941769068]: Forcing OpenGl version 0.
[ INFO] [1703926682.492292234]: Stereo is NOT SUPPORTED
[ INFO] [1703926682.492539919]: OpenGL device: NVIDIA Tegra Xavier (nvgpu)/integrated
[ INFO] [1703926682.492651438]: OpenGl version: 4.6 (GLSL 4.6).

ORB-SLAM3 Copyright (C) 2017-2020 Carlos Campos, Richard Elvira, Juan J. Gómez, José M.M. Montiel and Juan D. Tardós, University of Zaragoza.
ORB-SLAM2 Copyright (C) 2014-2016 Raúl Mur-Artal, José M.M. Montiel and Juan D. Tardós, University of Zaragoza.
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it
under certain conditions. See LICENSE.txt.

Input sensor was set to: RGB-D
[orb_slam3-2] process has died [pid 8623, exit code -11, cmd /home/robot/Desktop/motion_control/devel/lib/orb_slam3_ros/ros_rgbd /camera/rgb/image_raw:=/camera/rgb/image_color /camera/depth_registered/image_raw:=/camera/depth/image __name:=orb_slam3 __log:=/home/robot/.ros/log/849ed678-a6f1-11ee-9cd4-d8c0a650ee1f/orb_slam3-2.log].
log file: /home/robot/.ros/log/849ed678-a6f1-11ee-9cd4-d8c0a650ee1f/orb_slam3-2*.log
[ WARN] [1703926699.618176433]: No transform between frames /world and /camera available after 20.011265 seconds of waiting. This warning only prints once.

I installed eigen3, Pangolin, OpenCV normally, where opencv version is 4.1.1 and libopencv-dev version is as follows.

dpkg -s libopencv-dev | grep Version
Version: 4.1.1-2-gd5a58aa75

Also, I used orb_slam3_ros on a dual system ubuntu and it compiled and roslaunch successfully with opencv and libopencv-dev version 3.2.0. And there are no errors at all. How to fix them please, thanks!

thien94 commented 7 months ago

Hi @luminous-wu , thank you for testing out the code. Do you have the same errors when running the other nodes (e.g., mono, stereo, mono-imu etc.) ? You can try them out by downloading an example bag from EuRoC dataset first. Most likely, I suspect it's an issue with incompatible packages. But If you can run it normally on a dual system, perhaps you can try using docker as well?

luminous-wu commented 7 months ago

Thanks for your reply. Running other launch files would give the same error. Happily I got this fixed recently, I found the solution in question #4 :

By putting some prints in an there in the code i found out that the problem was caused by the line 70 in System.cc in the src folder of ORBSLAM3: "cv::FileStorage fsSettings(strSettingsFile.c_str(), cv::FileStorage::READ);" That line was giving "segmentation fault" error which was caused by the fact that cv-bridge that comes with ros melodic requires opencv 3.3 and the opencv version that i was using was 4.7. I solved the problem by installing a custom-made version of cv-bridge made for OpenCV 4. That's the question in stackoverflow that i followed to solve the problem: https://stackoverflow.com/questions/70127095/conflict-between-opencv-4-and-cv-bridge-in-ros-node

This also solves the "segmentation fault" issue I was running ORB_SLAM3 in UZ-SLAMLab's code:

ORB_SLAM3 ➤ rosrun ORB_SLAM3 RGBD Vocabulary/ORBvoc.txt Examples/RGB-D/TUM1.yaml

ORB-SLAM3 Copyright (C) 2017-2020 Carlos Campos, Richard Elvira, Juan J. Gómez, José M.M. Montiel and Juan D. Tardós, University of Zaragoza.
ORB-SLAM2 Copyright (C) 2014-2016 Raúl Mur-Artal, José M.M. Montiel and Juan D. Tardós, University of Zaragoza.
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it
under certain conditions. See LICENSE.txt.

Input sensor was set to: RGB-D
[1]    28745 segmentation fault (core dumped)  rosrun ORB_SLAM3 RGBD Vocabulary/ORBvoc.txt Examples/RGB-D/TUM1.yaml
gowthambbbs commented 5 months ago

I am getting the same error with the euroc_mono when run with a monocular camera on a jetson nano ubuntu 20.04.

lazuraihan commented 5 months ago

Thanks for your reply. Running other launch files would give the same error. Happily I got this fixed recently, I found the solution in question #4 :

By putting some prints in an there in the code i found out that the problem was caused by the line 70 in System.cc in the src folder of ORBSLAM3: "cv::FileStorage fsSettings(strSettingsFile.c_str(), cv::FileStorage::READ);" That line was giving "segmentation fault" error which was caused by the fact that cv-bridge that comes with ros melodic requires opencv 3.3 and the opencv version that i was using was 4.7. I solved the problem by installing a custom-made version of cv-bridge made for OpenCV 4. That's the question in stackoverflow that i followed to solve the problem: https://stackoverflow.com/questions/70127095/conflict-between-opencv-4-and-cv-bridge-in-ros-node

This also solves the "segmentation fault" issue I was running ORB_SLAM3 in UZ-SLAMLab's code:

ORB_SLAM3 ➤ rosrun ORB_SLAM3 RGBD Vocabulary/ORBvoc.txt Examples/RGB-D/TUM1.yaml

ORB-SLAM3 Copyright (C) 2017-2020 Carlos Campos, Richard Elvira, Juan J. Gómez, José M.M. Montiel and Juan D. Tardós, University of Zaragoza.
ORB-SLAM2 Copyright (C) 2014-2016 Raúl Mur-Artal, José M.M. Montiel and Juan D. Tardós, University of Zaragoza.
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it
under certain conditions. See LICENSE.txt.

Input sensor was set to: RGB-D
[1]    28745 segmentation fault (core dumped)  rosrun ORB_SLAM3 RGBD Vocabulary/ORBvoc.txt Examples/RGB-D/TUM1.yaml

@luminous-wu I got the same issue. How exactly you fix the "process has died exit code -11" and there is no transform between /world and /camera

luminous-wu commented 5 months ago

@lazuraihan @gowthambbbs Sorry for my late reply! This is still a problem I encountered three months ago, I can't remember the exact details, there are some recollections of the steps you can try! 1. libopencv and opencv c++ versions need to be the same.,you can check their versions with following code: dpkg -s libopencv-dev | grep Version pkg-config opencv4 --modversion modify the opencv4 if needed. 2. There may be a conflict between opencv and cv_bridge. I solved it by the instructions under this problem: Conflict between OpenCV 4 and cv_bridge in ROS Node: In catkin_ws/src:

git clone git@github.com:fizyr-forks/vision_opencv.git
cd vision_opencv
git checkout opencv4