rajivbishwokarma / orb_slam3_ros_xavier

Running the ROS implementation of ORB_SLAM3 in NVIDIA Jetson Xavier NX
GNU General Public License v3.0
1 stars 0 forks source link

Segmentation fault in OpenCV when running rs_d435i_rgbd.launch #1

Open rajivbishwokarma opened 11 months ago

rajivbishwokarma commented 11 months ago

When running the rs_d435i_rgbd.launch file, there's an error as shown below.

Screenshot

image

rajivbishwokarma commented 11 months ago

Console Output:

rb@ubuntu:~/catkin_ws/src/orb_slam3_ros/launch$ roslaunch orb_slam3_ros rs_d435i_rgbd.launch
... logging to /home/rb/.ros/log/7b12fbee-551a-11ee-9165-204ef60a0667/roslaunch-ubuntu-3473.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://ubuntu:35013/

SUMMARY
========

PARAMETERS
 * /orb_slam3/cam_frame_id: camera
 * /orb_slam3/enable_pangolin: True
 * /orb_slam3/settings_file: /home/rb/catkin_w...
 * /orb_slam3/voc_file: /home/rb/catkin_w...
 * /orb_slam3/world_frame_id: world
 * /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: noetic
 * /rosversion: 1.16.0
 * /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)

ROS_MASTER_URI=http://localhost:11311

process[orb_slam3-1]: started with pid [3487]
process[rviz-2]: started with pid [3488]
process[orb_slam3_ros/trajectory_server_orb_slam3-3]: started with pid [3489]
[ INFO] [1694928560.651265440]: Waiting for tf transform data between frames /world and base_link to become available

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
Loading settings from /home/rb/catkin_ws/src/orb_slam3_ros/config/RGB-D/RealSense_D435i.yaml
Camera1.k3 optional parameter does not exist...
    -Loaded camera 1
Camera.newHeight optional parameter does not exist...
Camera.newWidth optional parameter does not exist...
    -Loaded image info
    -Loaded RGB-D calibration
    -Loaded ORB settings
Viewer.imageViewScale optional parameter does not exist...
    -Loaded viewer settings
System.LoadAtlasFromFile optional parameter does not exist...
System.SaveAtlasToFile optional parameter does not exist...
    -Loaded Atlas settings
System.thFarPoints optional parameter does not exist...
    -Loaded misc parameters
----------------------------------
SLAM settings: 
    -Camera 1 parameters (Pinhole): [ 617.201 617.362 324.637 242.462 ]
    -Camera 1 distortion parameters: [  0 0 0 0 ]
    -Original image size: [ 640 , 480 ]
    -Current image size: [ 640 , 480 ]
    -Sequence FPS: 30
    -RGB-D depth map factor: 1000
    -Features per image: 1250
    -ORB scale factor: 1.2
    -ORB number of scales: 8
    -Initial FAST threshold: 20
    -Min FAST threshold: 7

Loading ORB Vocabulary. This could take a while...
[ INFO] [1694928561.534939524]: rviz version 1.14.20
[ INFO] [1694928561.536393375]: compiled against Qt version 5.12.8
[ INFO] [1694928561.536786813]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1694928561.589857366]: Forcing OpenGl version 0.
Vocabulary loaded!

Initialization of Atlas from scratch 
Creation of new map with id: 0
Creation of new map with last KF id: 0
Seq. Name: 
There are 1 cameras in the atlas
Camera 0 is pinhole
[ INFO] [1694928563.608210223]: Stereo is NOT SUPPORTED
[ INFO] [1694928563.608485134]: OpenGL device: NVIDIA Tegra Xavier (nvgpu)/integrated
[ INFO] [1694928563.608633197]: OpenGl version: 4.6 (GLSL 4.6).
Starting the Viewer
[orb_slam3-1] process has died [pid 3487, exit code -11, cmd /home/rb/catkin_ws/devel/lib/orb_slam3_ros/ros_rgbd /camera/color/image_raw:=/camera/rgb/image_raw /camera/depth_registered/image_raw:=/camera/aligned_depth_to_color/image_raw __name:=orb_slam3 __log:=/home/rb/.ros/log/7b12fbee-551a-11ee-9165-204ef60a0667/orb_slam3-1.log].
log file: /home/rb/.ros/log/7b12fbee-551a-11ee-9165-204ef60a0667/orb_slam3-1*.log
[ WARN] [1694928580.657462382]: No transform between frames /world and base_link available after 20.006294 seconds of waiting. This warning only prints once.
rajivbishwokarma commented 11 months ago

Log file: roslaunch-ubuntu-4373.log

rajivbishwokarma commented 11 months ago

Attaching GDB in the launch file with the following:

<node name="orb_slam3" pkg="orb_slam3_ros" type="ros_rgbd" output="screen" launch-prefox="gdb -ex run --args">

Results in the following console output:

rb@ubuntu:~/catkin_ws/src/orb_slam3_ros/launch$ roslaunch orb_slam3_ros rs_d435i_rgbd.launch
... logging to /home/rb/.ros/log/7b12fbee-551a-11ee-9165-204ef60a0667/roslaunch-ubuntu-4231.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://ubuntu:35169/

SUMMARY
========

PARAMETERS
 * /orb_slam3/cam_frame_id: camera
 * /orb_slam3/enable_pangolin: True
 * /orb_slam3/settings_file: /home/rb/catkin_w...
 * /orb_slam3/voc_file: /home/rb/catkin_w...
 * /orb_slam3/world_frame_id: world
 * /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: noetic
 * /rosversion: 1.16.0
 * /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)

ROS_MASTER_URI=http://localhost:11311

process[orb_slam3-1]: started with pid [4246]
process[rviz-2]: started with pid [4247]
process[orb_slam3_ros/trajectory_server_orb_slam3-3]: started with pid [4248]
[ INFO] [1694931508.513090440]: Waiting for tf transform data between frames /world and base_link to become available
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/rb/catkin_ws/devel/lib/orb_slam3_ros/ros_rgbd...
(No debugging symbols found in /home/rb/catkin_ws/devel/lib/orb_slam3_ros/ros_rgbd)
Starting program: /home/rb/catkin_ws/devel/lib/orb_slam3_ros/ros_rgbd /camera/color/image_raw:=/camera/rgb/image_raw /camera/depth_registered/image_raw:=/camera/aligned_depth_to_color/image_raw __name:=orb_slam3 __log:=/home/rb/.ros/log/7b12fbee-551a-11ee-9165-204ef60a0667/orb_slam3-1.log
[ INFO] [1694931509.281134725]: rviz version 1.14.20
[ INFO] [1694931509.282109450]: compiled against Qt version 5.12.8
[ INFO] [1694931509.282670541]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1694931509.344216117]: Forcing OpenGl version 0.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
[ INFO] [1694931510.853101085]: Stereo is NOT SUPPORTED
[ INFO] [1694931510.853345982]: OpenGL device: NVIDIA Tegra Xavier (nvgpu)/integrated
[ INFO] [1694931510.853466655]: OpenGl version: 4.6 (GLSL 4.6).
[New Thread 0xffffe9650900 (LWP 4276)]
[New Thread 0xffffe8e4f900 (LWP 4277)]
[New Thread 0xffffe3ffc900 (LWP 4278)]
[New Thread 0xffffe37fb900 (LWP 4279)]

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
Loading settings from /home/rb/catkin_ws/src/orb_slam3_ros/config/RGB-D/RealSense_D435i.yaml
Camera1.k3 optional parameter does not exist...
    -Loaded camera 1
Camera.newHeight optional parameter does not exist...
Camera.newWidth optional parameter does not exist...
    -Loaded image info
    -Loaded RGB-D calibration
    -Loaded ORB settings
Viewer.imageViewScale optional parameter does not exist...
    -Loaded viewer settings
System.LoadAtlasFromFile optional parameter does not exist...
System.SaveAtlasToFile optional parameter does not exist...
    -Loaded Atlas settings
System.thFarPoints optional parameter does not exist...
    -Loaded misc parameters
----------------------------------
SLAM settings: 
    -Camera 1 parameters (Pinhole): [ 617.201 617.362 324.637 242.462 ]
    -Camera 1 distortion parameters: [  0 0 0 0 ]
    -Original image size: [ 640 , 480 ]
    -Current image size: [ 640 , 480 ]
    -Sequence FPS: 30
    -RGB-D depth map factor: 1000
    -Features per image: 1250
    -ORB scale factor: 1.2
    -ORB number of scales: 8
    -Initial FAST threshold: 20
    -Min FAST threshold: 7

Loading ORB Vocabulary. This could take a while...
Vocabulary loaded!

Initialization of Atlas from scratch 
Creation of new map with id: 0
Creation of new map with last KF id: 0
Seq. Name: 
There are 1 cameras in the atlas
Camera 0 is pinhole
[New Thread 0xffffe19bb900 (LWP 4280)]
[New Thread 0xffffe11ba900 (LWP 4281)]
[New Thread 0xffffe09b9900 (LWP 4282)]
[New Thread 0xffffc88c2900 (LWP 4283)]
[New Thread 0xffffc25ac900 (LWP 4284)]
Starting the Viewer

Thread 8 "ros_rgbd" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xffffe09b9900 (LWP 4282)]
0x0000fffff76693a4 in cv::_OutputArray::create(cv::Size_<int>, int, int, bool, cv::_OutputArray::DepthMask) const ()
   from /lib/aarch64-linux-gnu/libopencv_core.so.4.2
(gdb) [ WARN] [1694931528.520361131]: No transform between frames /world and base_link available after 20.007330 seconds of waiting. This warning only prints once.

Screenshot image

rajivbishwokarma commented 11 months ago

Backtracking in GDB results in the following console output:

image