HKUST-Aerial-Robotics / VINS-Fusion

An optimization-based multi-sensor state estimator
GNU General Public License v3.0
3.42k stars 1.37k forks source link

vins-fusion, I have errors. #116

Open leehyun0404 opened 4 years ago

leehyun0404 commented 4 years ago

Hello I am korean. I am not good at English. I hope you understand.

I faced a problem while running vins fusion. Will you help me?

OS type : 64bit ubuntu 16.04 ROS kinetic processor : Intel core i7-4770HQ @ 2.20GHz x8

realsense-ros 2.2.13 librealsense 2.33 .1 Eigen 3.3.7 Ceres solver 1.14.0 Realsense D435I

I opened four terminals window1 : roslaunch vins vins_rviz.launch

window2 : roslaunch realsense2_camera rs_camera.launch

window3 : rosrun vins vins node ~/catkin_ws/src/VINS-Fusion/config/realsense_d435i/realsense_stereo_imu_config.yaml

I have a problem Will you help me? Please...

dddd dd

(url)

rs_camera.launch---------------

realsense_stereo_imu_config.yaml-------------

%YAML:1.0

common parameters

support: 1 imu 1 cam; 1 imu 2 cam: 2 cam;

imu: 1
num_of_cam: 2

imu_topic: "/camera/imu" image0_topic: "/camera/infra1/image_rect_raw" image1_topic: "/camera/infra2/image_rect_raw" output_path: "/home/dji/output/"

cam0_calib: "left.yaml" cam1_calib: "right.yaml" image_width: 640 image_height: 480

Extrinsic parameter between IMU and Camera. estimate_extrinsic: 1 # 0 Have an accurate extrinsic parameters. We will trust the following imu^R_cam, imu^T_cam, don't change it.

1 Have an initial guess about extrinsic parameters. We will optimize around your initial guess.

body_T_cam0: !!opencv-matrix rows: 4 cols: 4 dt: d data: [ 1, 0., 0., -0.00552000012248755, 0., 1, 0., 0.00510000018402934, 0., 0., 1, 0.011739999987185, 0., 0., 0., 1. ]

body_T_cam1: !!opencv-matrix rows: 4 cols: 4 dt: d data: [ 1, 0., 0., 0.0444129034876823, 0., 1, 0., 0.00510000018402934, 0., 0., 1, 0.011739999987185, 0., 0., 0., 1. ]

Multiple thread support

multiple_thread: 1

feature traker paprameters

max_cnt: 150 # max feature number in feature tracking min_dist: 30 # min distance between two features freq: 10 # frequence (Hz) of publish tracking result. At least 10Hz for good estimation. If set 0, the frequence will be same as raw image F_threshold: 1.0 # ransac threshold (pixel) show_track: 1 # publish tracking image as topic flow_back: 1 # perform forward and backward optical flow to improve feature tracking accuracy

optimization parameters

max_solver_time: 0.04 # max solver itration time (ms), to guarantee real time max_num_iterations: 8 # max solver itrations, to guarantee real time keyframe_parallax: 10.0 # keyframe selection threshold (pixel)

imu parameters The more accurate parameters you provide, the better performance

acc_n: 0.1 # accelerometer measurement noise standard deviation. #0.2 0.04
gyr_n: 0.01 # gyroscope measurement noise standard deviation. #0.05 0.004
acc_w: 0.001 # accelerometer bias random work noise standard deviation. #0.002
gyr_w: 0.0001 # gyroscope bias random work noise standard deviation. #4.0e-5
g_norm: 9.805 # gravity magnitude

unsynchronization parameters

estimate_td: 1 # online estimate time offset between camera and imu td: 0.00 # initial value of time offset. unit: s. readed image clock + td = real image clock (IMU clock)

loop closure parameters

load_previous_pose_graph: 0 # load and reuse previous pose graph; load from 'pose_graph_save_path' pose_graph_save_path: "/home/dji/output/pose_graph/" # save and load path save_image: 0 # save image in pose graph for visualization prupose; you can close this function by setting 0

suyu13020027161 commented 4 years ago

i have the same problem, i use the gazebo simulator, but vins doesn't seem to work properly.

Pallav1299 commented 2 years ago

I tested VINS-FUSION with gazebo and real-world. Following are the results: Real world: Decent performance with Realsense D435i.

Gazebo: Stereo mode is giving decent results while, in VI Stereo the performance degrades.

Poor VI-SLAM results with VINS Fusion in gazebo might be due to the following:

  1. Bad data from IMU plugin. I configured the plugin to output data with zero noise and sensor bias. But still the noise exists. I verified this by testing with imu_utils for finding the sensor noise and bias. I tested it with default gazebo plugins and hector_gazebo_imu_plugin.
  2. I am also consistently getting the following optimizer warnings/errors:
    
    Error in evaluating the ResidualBlock.

There are two possible reasons. Either the CostFunction did not evaluate and fill all
residual and jacobians that were requested or there was a non-finite value (nan/infinite) generated during the or jacobian computation.

Residual Block size: 5 parameter blocks x 2 residuals

For each parameter block, the value of the parameters are printed in the first column
and the value of the jacobian under the corresponding residual. If a ParameterBlock was held constant then the corresponding jacobian is printed as 'Not Computed'. If an entry of the Jacobian/residual array was requested but was not written to by user code, it is indicated by 'Uninitialized'. This is an error. Residuals or Jacobian values evaluating to Inf or NaN is also an error.

Residuals: -nan -nan

Parameter Block 0, size: 7

 1.07506 |     -43.8169      9.63801 
-1.48701 |     -62.1792       1.2691 
0.226267 |    -0.881051     -62.0186 

0.00928231 | 50.6846 224.495 0.00369336 | -35.7264 325.458 0.00283941 | -477.187 36.9214 0.999946 | 0 0

Parameter Block 1, size: 7

 1.12702 |      43.8169     -9.63801 
-1.58163 |      62.1792      -1.2691 
0.236191 |     0.881051      62.0186 

0.00981494 | -50.0767 -218.493 0.0038356 | 35.6784 -322.279 0.00264367 | 469.772 -35.6784 0.999941 | 0 0

Parameter Block 2, size: 7

    0.12 |   -0.0241753   -0.0172021 
       0 |    0.0172549    0.0621977 
       0 |   -0.0538629  -0.00277532 
     0.5 |    0.0544573     -3.17951 
    -0.5 |       7.4171      -1.2355 
     0.5 |     0.607914      6.00278 
    -0.5 |            0            0 

Parameter Block 3, size: 1

     0.2 |     -18.0016      1.16311 

Parameter Block 4, size: 1

       0 | Not Computed  Not Computed  

E1005 11:43:57.926491 27988 trust_region_minimizer.cc:72] Terminating: Residual and Jacobian evaluation failed.



Has someone been able to get it working in gazebo?
MuhammadAhmedMasood commented 2 years ago

Hi ! Can you tell how did you do it using Gazebo. I am also have huge drift on rviz.

zhangjianglv commented 1 year ago

@Pallav1299 hi,I ran into the same problem as you, did you solve it?

leehyun0404 commented 1 year ago

Hi, It was a long time ago. i didn't solve problem.

I will give you a reference site. youtube : Mason Eungchang

send he a mail. good luck ~

-----Original Message----- From: @.> To: @.>; Cc: @.>; @.>; Sent: 2022-11-16 (수) 16:45:00 (GMT+09:00) Subject: Re: [HKUST-Aerial-Robotics/VINS-Fusion] vins-fusion, I have errors. (#116)

@Pallav1299 hi,I ran into the same problem as you, did you solve it? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>